Lean 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).
This site catalogues Python's features to provide guidance on when they should be used.
- Browse the catalogue of Python features in the left hand sidebar.
- Search for a particular feature using the search bar in the top left of this page.
Lean Python organises Python's features into three broad categories:
Firstly, Common Python comprises 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.
Secondly, Situational Python comprises 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, Deprecated Python comprises 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.