The When of Python is a fledgling community initiative. The goal is to effectively shrink Python so it fits our brains by providing guidance on when we should use particular language features (and when we should not).
We start with Common Python - the features we should all know so we can basically read each other's work. Clarity on this will be especially useful for teachers and anyone learning Python.
Then there is Situational Python - the Python features that are useful but not for everyone or not all the time. It depends on the situation, for example:
- Web development might need very different features than scientific Python, e.g. asyncio
- Advanced library code might need advanced features, e.g. low-level threading / multi-processing
For each feature we try to provide guidance on what the situations are where it is the preferred One Obvious Way. The situations might be defined by domain (e.g. web application development vs data science) or type of code (e.g. scripting vs code with enterprise responsibilities).
Finally there is Deprecated Python - the features we should avoid using. And maybe we should go even further than that - perhaps working through existing code and expunging some features in favour of better alternatives. Soon(ish) we are planning to release some tools to make that easier.
The When of Python presentation as delivered at Kiwi Pycon 2022, and an addendum of post-conference refinements: