#678 – APRIL 22, 2025
Namespaces in Python
In this tutorial, you’ll learn about Python namespaces, the structures that store and organize the symbolic names during the execution of a Python program. You’ll learn when namespaces are created, how they’re implemented, and how they support variable scope.
REAL PYTHON
Quiz: Namespaces in Python
REAL PYTHON
Stop Writing __init__
Methods
Glyph recommends using dataclasses in order to avoid the use of __init__
. This post shows you how and what additional work you need to do for constructor side effects.
GLYPH LEFKOWITZ
AI Agent Code Walkthrough with Python & Temporal
Join us on May 2nd at 9am PST/12pm EST for a deep dive into using Temporal’s Agentic AI use cases. We’ll begin with a live demo demonstrating how Temporal lets you recover from unexpected issues before transitioning to a live walkthrough with our Solution Architects →
TEMPORAL sponsor
Practical Uses of Sets
Sets are unordered collections of values that are great for removing duplicates, quick containment checks, and set operations.
TREY HUNNER
PEP 770: Improving Measurability of Python Packages With Software Bill-of-Materials (Accepted)
PYTHON.ORG
PEP 736: Shorthand Syntax for Keyword Arguments at Invocation (Rejected)
PYTHON.ORG
PEP 661: Sentinel Values (Deferred)
PYTHON.ORG
Pydantic v2.11 Released
PYDANTIC.DEV
Quiz: Python’s Instance, Class, and Static Methods Demystified
REAL PYTHON
Articles & Tutorials
Elliptical Python Programming
This fun little article shows how certain combinations of punctuation in Python can evaluate to integers, and as a result allow you to create some rather obfuscated code. See also this associated article that breaks down exactly how it all works.
SUSAM PAL
How to Exit Loops Early With the Python Break Keyword
In this tutorial, you’ll explore various ways to use Python’s break statement to exit a loop early. Through practical examples, such as a student test score analysis tool and a number-guessing game, you’ll see how the break statement can improve the efficiency and effectiveness of your code.
REAL PYTHON
YOLO11 for Real-Time Object Detection
Ready-to-deploy, state of the art, open source computer vision apps? Sign me up!
INTEL CORPORATION sponsor
Creating a Python Dice Roll Application
In this step-by-step video course, you’ll build a dice-rolling simulator app with a minimal text-based user interface using Python. The app will simulate the rolling of up to six dice. Each individual die will have six sides.
REAL PYTHON course
Django Simple Deploy and Other DevOps Things
Talk Python interviews Eric Matthes, educator, author, and developer behind Django Simple Deploy. If you’ve ever struggled with taking that final step of getting your Django app onto a live server this tool might be for you.
KENNEDY & MATTHES podcast
Mastering DuckDB: Part 2
This is the second part in a post on how to use DuckDB when you’re used to pandas or Polars. It covers how to translate DataFrame operations into not-so-obvious SQL ones.
QUANSIGHT.ORG • Shared by Marco Gorelli
ProcessThreadPoolExecutor: When I/O Becomes CPU-bound
Learn how to combine thread and process management into a single executor class. Includes details on when you may be I/O vs CPU bound and what to do about it.
LEMON24
14 Advanced Python Features
Edward has collected a series of Python tricks and patterns that he has used over the years. They include typing overloads, generics, protocols, and more.
EDWARD LI
Python Is an Interpreted Language With a Compiler
Ever wonder where about the distinction between compiled and interpreted languages? Python straddles the boundaries, and this article explains just that.
NICOLE TIETZ-SOKOLSKAYA
Marimo: Reactive Notebooks for Python
Marimo is a new alternative to Jupyter notebooks. Talk Python interviews Akshay Agrawal and they talk all about this latest data science tool
KENNEDY, AGRAWAL
Background Tasks in Django Admin With Celery
This tutorial looks at how to run background tasks directly from Django admin using Celery.
TESTDRIVEN.IO • Shared by Michael Herman
Quiz: How to Exit Loops Early With the Python Break Keyword
REAL PYTHON
Projects & Code
VTK: Open Source 3D Graphics and Visualization
Visualization Toolkit
KITWARE.COM
django-action-triggers: Actions in Response to DB Changes
GITHUB.COM/SALAAH01
pytest.nvim: Neovim Plugin for Python Testing
GITHUB.COM/RICHARDHAPB
nbdime: Tools for Diffing and Merging Jupyter Notebooks
GITHUB.COM/JUPYTER
maestro-cli: CLI to Play Songs
GITHUB.COM/PRAJWALVANDANA
Events
Weekly Real Python Office Hours Q&A (Virtual)
April 23, 2025
REALPYTHON.COM
PyCon DE & PyData 2025
April 23 to April 26, 2025
PYCON.DE
DjangoCon Europe 2025
April 23 to April 28, 2025
DJANGOCON.EU
PyCon Lithuania 2025
April 23 to April 26, 2025
PYCON.LT
Django Girls Ho, 2025
April 25, 2025
DJANGOGIRLS.ORG
Django Girls Ho, 2025
April 26, 2025
DJANGOGIRLS.ORG
Happy Pythoning!
This was PyCoder’s Weekly Issue #678.
View in Browser »
[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]
Source:: PyCoder’s