The other day I needed to brush up my knowledge on Python decorators, for implementing a profiling hook for a Django REST API I’ve been working on. I googled around and landed on a question titled Understanding Python Decorators on Stackoverflow.com. The answer given by the user e-satis is an excellent introduction to decorators in Python, although it has not been selected as the official answer. Go ahead an give it read if you have done some Python coding.
This got me thinking. This guy does not care about whether or not his answer gets selected before others (so that he can bag some reputation). He took his time and explained what decorators are in a well thought-out, step-by-step manner. The end result is an answer worthy of being placed in a beginner level Python book as a chapter on decorators! So there must be other answers as awesome as this one, given by users as knowledgable as e-satis! I set out to find few more great StackOverflow threads on core Python programming, had them bookmarked for future reads, and now sharing them on this blog post. You should read each of them at least once to make your knowledge on core Python more solid.
As I mentioned above, great introduction to decorators in Python.
Another great answer from e-satis (later turned into a community wiki). Explains what meta-classes are in Python and why are they so useful.
The answer to this question often comes in handy!
A short yet useful answer explaining what good is super() for. You should also read the article Pythons’s super() considered super! along with this.
I always wondered; and Kimvais provided the answer! Also checkout Alex’s answer in the same thread.
Another gem from e-satis. Introduced the concept of iterators and generators in Python and goes on to explain the use of yield statement.
The stylistic reasons for choosing double quotes or single quotes when coding in Python. Worth a read.
Very detailed answer explaining Python compilation/interpretation process to programmers not coming comp-sci background; something every Pythonist should know.
Last but not the least! A great thread showing what road a Python beginner should take to achieve mastery.
If you know about any other great StackOverflow posts, please do share them on the comment section. I’ll update my list. The posts must be about Python (core Python more specifically).