-
Don't get me wrong, the learning curve is real!
However Python devs have a head start — you already think in types, you already care about elegance + clean code.
Which tip would've helped you most? Or any other ones?
-
Tomorrow's free LIVE session covers how to structure real Python projects using these patterns.
-
You can also model the repository interface with `typing.Protocol`, so any implementation (SQL, CSV, API, in-memory) just has to “duck type” to that contract:
-
This week on our @pybites podcast: Code Smells 🎉
I talk about 15 things to look out for in your (and others) code to make it cleaner and more maintainable over time. 🐍 😍
I hope this is helpful for you:
https://pybit.es/articles/write-more-maintainable-python-code-avoid-these-15-code-smells/Happy to hear your thoughts on this ... 💡
#python #cleancode #codequality #codesmells #maintainability #softwaredevelopment #softwaredesign #codingbestpractices #refactoring
-
People newer to Python often get confused by the statement:
if __name__ == "__main__":
That's many underscores ("dunders"), right?
In essence it lets you put code in your module that ONLY should execute when the module is called directly. So not when you import from it.
I explain this further with a practical example in this 3 minute video:
https://www.youtube.com/watch?v=ubpFY7_dAW4