Python Tip #229 (of 365): Don't overuse classes. Writing Python code does NOT re...
Trey Hunner ๐ @treyhunner@mastodon.social
Python Tip #229 (of 365):
Don't overuse classes.
Writing Python code does NOT require writing classes.
Unlike many programming languages, you can accomplish quite a bit in Python without ever making a class.
The most common reason to write a class is that a framework REQUIRES one (like Django's Model classes).
The best reason to write your OWN class: you have data and functionality that clearly belong together.
๐งต (1/3)