Python Decorators Considered Harmful | Issue #50


Hi there,

If you’ve ever used Python decorators, you know they look like a clean way to add functionality. But have you ever struggled to debug a decorated function? Or wondered why your type hints suddenly break? Or spent way too much time figuring out why your decorators aren’t working as expected? 🫠 🚨

Decorators introduce hidden complexity that can turn your code into a nightmare. And honestly? I think they’re overused. In this week’s video, I explain:

  • Why decorators break type safety and make debugging harder
  • How the wrong order of decorators can silently break your app
  • Why some decorators expect hidden arguments (and how that messes up your code)
  • The few cases where decorators actually make sense

If you want to write better, cleaner Python, this video is a must-watch. 🚀

Happy coding! 🐍

Cheers,

Arjan

# News

Meet DuckDB: The Sqlite of Analytics… but Actually Fast 🦆

Still wrestling with CSVs in pandas or stuffing everything into PostgreSQL just to get some analysis done? It might be time to level up your data workflow. 🚀

Meet DuckDB —a lightweight, blazing-fast analytical database that plays beautifully with Python, and runs in-process. That means: no server, no setup headaches, just smooth data magic. ✨

Real Python 🐍 recently published a great article breaking it all down. And if you prefer a more interactive deep dive, I made a video explaining why DuckDB is a total game-changer for Python devs and data enthusiasts alike. 🎥 You can watch it here!

🧵 Writing Async-Aware Decorators in Python

Ever tried decorating an async function and hit a wall? Tanner Young’s post is a goldmine for Python devs who want to write decorators that just work—whether the target function is synchronous or asynchronous.

He covers:

  • How to detect if a function is async
  • Why await can’t be used blindly in decorators
  • A clean pattern to support both sync + async functions

A must-read for Python devs looking to level up their async game. 👉 Check it out here.

# Community

In the #project_showcase channel, community member razorblade23 shared an exciting new tool: PyCrucible — a cross-platform builder and launcher for Python apps using Rust and uv.

It packages your app into a single executable that self-extracts, installs dependencies, and just runs. No setup required. 🛠

The project is in its early alpha phase and evolving fast, with thoughtful feedback already coming in from folks like James Parrott.

👉 Curious? Want to help shape it? Join the conversation in Discord and share your thoughts, suggestions, or test results. 💬


Do you enjoy my content on YouTube and would you like to dive in deeper? Check out my online courses below. They've helped thousands of developers take the next step in their careers.

🚀 The Mindset Online Course Series

The goal of this series is to help junior developers grow their skills to become senior developers faster.

💥 Other Courses

💡 If you’re part of a development team at a company, I offer special packages for companies that give your team the tools to consistently write high-quality code and dramatically increase your team's productivity.

Unsubscribe | Send by ArjanCodes

Jan van Eijklaan 2-4, Bilthoven, UT 3723 BC

The Friday Loop

Every Friday, you'll get a recap of the most important and exciting Python and coding news. The Friday Loop also keeps everyone posted on new ArjanCodes courses and any limited offers coming up.

Read more from The Friday Loop

Hi there, Ever looked at your old code and felt secondhand embarrassment? Yeah, me too. Keeping your code simple and maintainable is an art. In today’s video, I break down 10 essential tips that will help you write cleaner, more efficient Python code. 🚀 Some key takeaways: 🛑 Stop overengineering—simple solutions are often the best. ✂️ Cut the copy-paste habit—DRY code is maintainable code. 🧹 Refactor before your code turns into a horror movie. Happy coding! 🐍 Cheers, Arjan # News How Do...

Hi there, Have you ever hesitated before hitting git merge or git rebase because… well, who actually understands Git? 🤯 Good news! In this week’s video, I walk through a real-world FastAPI project and show exactly how to merge, fast-forward, and rebase—step by step. No fluff, just practical Git skills you’ll actually use. Plus, I’m sharing some advanced Git tricks to make your workflow smoother. Happy coding and enjoy the video! Cheers, Arjan # News Build TUI Apps with Python’s Textual Ever...

Hi there, You’ve probably heard the phrase: “Coupling is bad.” But what if I told you that coupling is actually necessary? The real issue isn’t that your code has coupling—it’s that some types of coupling are worse than others. 🚨 In this week’s video, I dive into three real-world examples of bad coupling and show you how to refactor them into better designs. We’ll tackle: Global coupling – Why global variables cause headaches and how to avoid them Content coupling – When modules dig too deep...