Summary

Look at other people’s code a lot, open source projects and the Python Standard Library itself.

But remember the popularity of a Python open source project is not a guarantee of good code practices to be emulated in your own projects. Some popular projects implement questionable design practices. Don’t be led astray.

This article only touches the surface on all the things you need to think about. You can never get a complete picture of good practices from a single source. You should also not trust a single source as authoritative. The only way to achieve some mastery over Python is studying the advice of many people, articles, presentations, videos, etc.

Use the associated code review checklist as a starting point. Modify it as you research and gather experience.