| | Nested Functions in Python Functions in Python can be defined within another function, this post shows you how and just why you might do that. TREY HUNNER
Bitwise Operators in Python Learn how to use Python’s bitwise operators to manipulate individual bits of data at the most granular level. REAL PYTHON
Quiz: Bitwise Operators in Python REAL PYTHON
Prevent Postgres Slowdowns on Python Apps With This Check List Avoid performance regressions in your Python app by staying on top of Postgres maintenance. This monthly check list outlines what to monitor, how to catch slow queries early, and ways to ensure indexes, autovacuum, and I/O are performing as expected → PGANALYZEsponsor
From Async/Await to Virtual Threads In this opinion piece, Armin describes how he wishes async in Python would work. ARMIN RONACHER
Narwhals v2.0.0 Released GITHUB.COM/NARWHALS-DEV
Mypy 1.17 Released MYPY-LANG.BLOGSPOT.COM
PEP 798: Unpacking in Comprehensions (Added) PYTHON.ORG
PEP 799: A Dedicated Profilers Package for Organizing Python Profiling Tools (Added) PYTHON.ORG
Discussions What’s the Point of Try/Except Just to Raise the Exception? REDDIT
Articles & Tutorials PyPI Users Email Phishing Attack PyPI users are being targeted by an email phishing attack attempting to trick them into logging into a fake PyPI site. This post from the Security Engineer at PyPI discusses what is happening and what you should do about it. There is also a follow-up post. MIKE FIEDLER
Smuggling Arbitrary Data Through an Emoji Unicode includes flexibility through the use of Variation Selectors. These include the ability to change characters through a consecutive series of coding points. But, when used with code points that don’t need them, they’re ignored, so you can hide data in them. PAUL BUTLER
Introducing an Intuitive IDE for Code and Data Positron offers an intuitive environment for exploring data, plots, apps, and connections within your IDE. POSITsponsor
Creating an XML Editor With Textual Several years ago, Mike created an XML editor with the wxPython GUI toolkit called Boomslang. Recently he ported it to Textual and this post gives you step by step instructions on how to create your own. MIKE DRISCOLL
Stop Using Django’s squashmigrations Squashing merges multiple database migrations into a single consolidated file to speed up database setup and tidy up history. Learn why it is sometimes problematic and what else you can do. JOHNNY METZ
When to Use Classes in Python? Having trouble figuring out when to use classes? This article looks at another heuristic for using classes in Python, with examples from real-world code, and some things to keep in mind. ADRIAN
Faster Python: Unlocking the Python Global Interpreter Lock Take a look at true multithreading in Python 3.13 with the no-GIL option. Learn why it matters and compare performance with and without the Global Interpreter Lock. CHEUK TING HO
TIL: Exception.add_note() A quick “Thing I Learned” article showing the .add_note() methods on Exceptions and how you can provide more information when something goes wrong. DANIEL ROY GREENFELD
metap: A Meta-Programming Layer for Python metap is a meta-programming layer for Python. It is useful for automating coding patterns or applying transformations to your code. BAZIOTIS & MENDIS
Working With Python’s Built-in Exceptions Learn the most common built-in Python exceptions, when they occur, how to handle them, and how to raise them properly in your code. REAL PYTHON course
Coverage.py regex pragmas Coverage.py uses regexes to define pragma syntax. This is surprisingly powerful, allowing for custom exclusions and plugins. NED BATCHELDER
Following Up on the Python JIT A summary of the current state of the JIT compiler inside CPython based on a couple of talks from one of the creators. JAKE EDGE
Don’t Call Dunder Methods It’s best to avoid calling dunder methods. It’s common to define dunder methods, but uncommon to call them directly. TREY HUNNER
Projects & Code Brought to you by Real Python for Teamssponsor Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed → abogen: Generate Audiobooks From EPUBs & PDFs GITHUB.COM/DENIZSAFAK
Otary: 2D Geometry Python Library GITHUB.COM/POUPEAUA • Shared by Alexandre Poupeau
Free-Threaded Map-Reduce GITHUB.COM/JOSEBLANCA • Shared by Jose Blanca
transfunctions: Support Both Sync and Async GITHUB.COM/POMPONCHIK • Shared by pomponchik (Evgeniy Blinov)
octopusdash: Dynamic Django Admin Panel GITHUB.COM/HUSSEINNAEEMSEC
| | | | | |
|