I have been programming Python for a while and I have a very good understanding of its features, but I would like to improve my coding style. I think reading the source code of
Queue.py shows you how to make a class thread-safe, and the proper use of the Template Method design pattern.
sched.py is a great example of the Dependency Injection pattern.
heapq.py is a really well-crafted implementation of the Heap data structure.
If I had to pick my three favorite modules in the Python standard library, this triplet would probably be my choice. (It doesn't hurt that they're all so very useful... but I'm picking in terms of quality of code, comments and design, first and foremost).