Wrapping Up

Intuitive Python — by David Muller (34 / 41)

The Pragmatic Programmers
The Pragmatic Programmers
2 min readSep 23, 2021

--

👈 Getting Caught with Sticky Default Arguments | TOC | Chapter 5 Standing Guard When Python Breaks Free 👉

In this chapter you’ve learned about some common traps to avoid in Python. In particular, you are primed to favor json (and other alternative libraries) over pickle, to always use timezone aware datetime objects in UTC, and to carefully avoid using mutable values like lists as defaults in your function signatures.

Next, we’ll explore how to shepherd your Python projects into green fields even as you face external challenges and unexpected problems. Among other topics, you’ll learn how to securely install third-party packages and keep your variables from being unexpectedly clobbered or shadowed.

Footnotes

[76] https://docs.python.org/3/library/json.html

[77] https://developers.google.com/protocol-buffers/

[78] http://parquet.apache.org

[79] https://docs.python.org/3/library/datetime.html

[80] https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow

[81] https://docs.python.org/3.9/whatsnew/3.9.html

[82] https://pypi.org/project/backports.zoneinfo/

[83] https://pypi.org/project/tzdata/

[84] https://pypi.org/project/flake8/

[85] https://pypi.org/project/flake8-bugbear/

[86] https://github.com/DavidMuller/intuitive-python-book

Copyright © 2021, The Pragmatic Bookshelf.

👈 Getting Caught with Sticky Default Arguments | TOC | Chapter 5 Standing Guard When Python Breaks Free 👉

Intuitive Python by David Muller can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

Unlisted

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.