The When of Python Blog

Guidance on when to use Python features (and when not to).
Comment your opinions on our articles to join the discussion.
Follow us on Twitter and GitHub to get the latest updates first.

Python Feature Opinions


Your Opinions Welcome

The When of Python is at heart a community project. We need people to share their opinions on different Python language features. If you have opinions on any language features we'd love to hear from you.

E.g. here is what a comment on lambda might look like:


Language feature: lambda

Common Python / Situational Python / Deprecated Python: Situational (see Welcome to the When of Python for definitions)

Opinion: Should only be used in sorting e.g. .sort(key=lambda ...) and, carefully, in Pandas e.g. .apply(lambda ...)

Any Interesting References (optional): Overusing lambda expressions in Python - Trey Hunner

Bio (optional): up to you - Anon is OK


This format is only a suggestion.

But please fire something off to us, either in the comments, or if you prefer, privately (whenofpython@p-s.co.nz).

We know people have opinions. Is type hinting a brilliant new feature; a blight on Python; or something else? Was the walrus operator worth the grief? Is structural pattern matching as good as it initially seems? Should dataclasses replace collections.namedtuple and typing.NamedTuple? Etc. You get the idea :-)