← All videos

7 Python Features That Make Your Code Worse

ArjanCodes · 58.9K views · 19 days ago
Show description

🧱 Build software that lasts. Join the Software Design Mastery program → arjan.codes/mastery. Python has a lot of powerful features, but just because you can use them doesn’t mean you always should. In this video, I look at 7 Python features that can quietly make your code harder to understand and maintain, from @property and dataclasses to caching, decorators, async, pattern matching, and slots. The goal isn’t to avoid these features, but to understand the trade-offs and know when they actually improve your design. 🔥 GitHub Repository: git.arjan.codes/2026/worse. 💬 Join my Discord server: discord.arjan.codes. ⌨️ Keyboard I’m using: amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 0:30 1. @property: Hiding expensive work 2:20 2. @dataclass: Turning everything into data 4:23 3. match: The fancy if statement 5:27 4. @cache: Free speed that isn’t free 6:53 5. Decorators: When important behavior becomes invisible 9:03 6. async: When async leaks into everything 12:59 7. dataclass(slots=True): Optimizing before measuring 15:09 Final Thoughts #arjancodes #softwaredesign #python

Open on YouTube ↗