How well do you know the different areas where Python shines? In this quiz, you'll revisit web apps and APIs, GUI apps, CLI tools, machine learning, and more. You'll also check what Python isn't suited for and which alternatives work better. Get ready to explore the wide scope of what you can do with Python.
Everything in Python is an object, or so the saying goes. If you want to create your own custom objects, with their own properties and methods, you use Python's class object to do it. But creating classes in Python sometimes means writing loads of repetitive, boilerplate code; for example, to set up the class instance from the parameters passed to it or to create common functions like comparison operators.
If you spend long enough in the programming world, you'll come across the term singleton at some point. And if you hadn't seen this term yet, well, now you have! In Python, you don't need singleton classes. Almost never. But creating one is a great exercise in understanding how Python creates objects. And discussing alternatives to a singleton class helps you explore other aspects of Python.
What's changed about learning Python over the last few years? What new techniques and updated advice should beginners have as they start their journey? This week on the show, Stephen Gruppetta and Martin Breuss return to discuss beginning to learn Python. We share techniques for finding motivation, building projects, and learning the fundamentals. We provide advice on installing Python and not obsessing over finding the perfect editor. We also examine incorporating LLMs into learning to code and practicing asking good questions.
Let's say we have some text that was retrieved from a database, and the original text came from a form submission in a web browser. Web browsers often represent line breaks as a carriage return character, followed by a line feed character: That's what we see in our text as well: \r followed by \n. This is often called CRLF (carriage return and line feed) whereas \n is called LF (line feed).
Back then, constructing decorators using function closures had various short comings and the resulting wrappers didn't preserve introspection and various other attributes associated with the wrapped function. Many of these issues have been resolved in updates to Python and the functools.wraps helper function, but wrapt based decorators were still useful for certain use cases such as being able to create a decorator where you could work out whether it was applied to a function, instance method, class method or even a class.
This quiz helps you practice sorting dictionaries by keys, values, and custom rules in modern Python. You'll revisit how insertion order works, when to use different views, and how to rebuild sorted dictionaries. You'll also learn best practices for sorting dictionaries efficiently. For a complete overview, check out Sorting Dictionaries: Keys, Values, and More. The quiz contains 11 questions and there is no time limit. You'll get 1 point for each correct answer.
At the end of August, Python: The Documentary premiered on YouTube, where you can watch it for free. It's an 84-minute film tracing Python's journey from Amsterdam side project to the world's most popular programming language: Produced by CultRepo (formerly Honeypot) and directed by Ida Bechtle, the documentary explores Python's evolution and the community that shaped it. It features Guido van Rossum and key contributors like Mariatta and recent Real Python Podcast guest, Travis Oliphant. The documentary also highlights the important role of PyLadies and addresses controversial topics including the Python 2 to 3 transition.
Ready to level up your Python code optimization skills? In this quiz, you'll revisit key concepts about profiling, benchmarking, and diagnosing performance bottlenecks. You'll practice with tools like cProfile and timeit, and see how deterministic and statistical profilers differ.
Here's how [he demonstrated](https://adamj.eu/tech/2025/07/30/python-check-package-version-importlib-metadata-version/) I should be doing it instead. ```toml # pyproject.toml [project] name = "air" version = "0.25.0" # This is the source of truth for the version number ```
The termncolor package and its malicious dependency colorinal highlight the increasing sophistication of attacks targeting software repositories, enabling attackers to achieve remote code execution and system persistence.
When tackling object-oriented programming problems, one must choose between inheritance and composition, as each has distinct trade-offs. Composition often leads to more flexible and reusable code.
Pandas is a Python library used for data analysis and manipulation on labeled datasets. The core mission of the Pandas development team is to be the fundamental high-level building block for practical, real-world data analysis in Python. It provides tools and methods for aligning, merging, transforming, and managing data from various persistent stores, positioning itself as the definitive tool for data analysis in Python.