What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a recent article series that digs into Python decorators. The first two articles discuss the basics of constructing decorators. The third part describes how popular Python libraries use decorators with call interception, function registration, and enriching the behavior of a function.
Christopher shares a piece about the common pitfalls of working with the Pythondatetime library. The article considers how current third-party libraries don’t address most of these quirks and offers a potential solution with a new library.
We also share several other articles and projects from the Python community, including a couple of news items, a discussion about the popularity of the Rust language, handling unset values in FastAPI with Pydantic, working with Python’s mini-language for formatting strings, mocking Django queryset functions, and a modern replacement for the Requests library.
This week’s episode is brought to you by Sentry.
Course Spotlight: Python Decorators 101
In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.
Topics:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Support the podcast & join our community of Pythonistas
Considering Accessibility & Assistive Tech as a Python Developer
Querying OpenStreetMaps via API & Lazy Evaluation in Python
Embarking on a Relaxed and Friendly Python Coding Journey
Pydantic Data Validation & Python Web Security Practices
Decoupling Systems to Get Closer to the Data
Avoiding Error Culture and Getting Help Inside Python
Leveraging Documents and Data to Create a Custom LLM Chatbot
Build a Video Game With Python Turtle & Visualize Data in Seaborn
Using Python in Bioinformatics and the Laboratory
Exploring Duck Typing in Python & Dynamics of Monkey Patching
Building a Healthy Developer Mindset While Learning Python
Automate Tasks With Python & Building a Small Search Engine
Wes McKinney on Improving the Data Stack & Composable Systems
Focusing on Data Science & Less on Engineering and Dependencies
Great Starting Points for Contributing to Open Source
Building a Python Debugger & Preparing for NumPy 2.0
Measuring Bias, Toxicity, and Truthfulness in LLMs With Python
Serializing Data With Python & Underscore Naming Conventions
Exploring Python in Excel
Create your
podcast in
minutes
It is Free
Insight Story: Tech Trends Unpacked
Zero-Shot
Fast Forward by Tomorrow Unlocked: Tech past, tech future
The Unbelivable Truth - Series 1 - 26 including specials and pilot
Lex Fridman Podcast