#__slots__

[ follow ]
#python
Python
fromdeath and gravity
3 hours ago

Learn Python object-oriented programming with Raymond Hettinger

Subclassing in Python is a technique for code reuse, emphasizing operational views over traditional hierarchical models.
Python
fromInfoWorld
2 weeks ago

Speed boost your Python programs with new lazy imports

Lazy imports in Python create a proxy object that delays the actual import until the module is needed.
Python
fromRealpython
3 weeks ago

Python Modules and Packages: An Introduction Quiz - Real Python

The quiz tests understanding of Python modules and packages through 10 questions.
Python
fromdeath and gravity
3 hours ago

Learn Python object-oriented programming with Raymond Hettinger

Subclassing in Python is a technique for code reuse, emphasizing operational views over traditional hierarchical models.
Web frameworks
fromInfoWorld
1 week ago

PEP 816: How Python is getting serious about Wasm

Python will now formally support WebAssembly standards through PEP 816, enhancing its usability in browser applications.
Python
fromRealpython
1 week ago

Python's Counter: The Pythonic Way to Count Objects Quiz - Real Python

The quiz tests understanding of Python's Counter for counting objects and performing multiset operations.
Python
fromInfoWorld
2 weeks ago

Speed boost your Python programs with new lazy imports

Lazy imports in Python create a proxy object that delays the actual import until the module is needed.
Python
fromRealpython
6 days ago

Implementing the Factory Method Pattern in Python Quiz - Real Python

The quiz tests understanding of the Factory Method Pattern in Python.
JavaScript
fromPythonSpeed
1 week ago

Timesliced reservoir sampling: a new(?) algorithm for profilers

Random sampling from an unknown-length event stream can effectively identify relevant information without storing all data.
Python
fromInfoWorld
6 days ago

Get started with Python's new frozendict type

Python 3.15 introduces frozendict, an immutable dictionary that is hashable and useful in scenarios where regular dictionaries cannot be used.
fromRealpython
1 month ago

Python Descriptors: An Introduction Quiz - Real Python

By working through this quiz, you'll revisit the descriptor protocol, how .__get__() and .__set__() control attribute access, and how to implement read only descriptors. You'll also explore data vs. non-data descriptors, attribute lookup order, and the .__set_name__() method.
Python
Python
fromRealpython
1 month ago

Threading in Python Quiz - Real Python

An interactive 10-question quiz assesses understanding of Python threading concepts including thread creation, ThreadPoolExecutor, locks for race condition prevention, and queue-based producer-consumer patterns.
Artificial intelligence
fromTechCrunch
1 month ago

Running AI models is turning into a memory game | TechCrunch

Rising DRAM prices and sophisticated prompt-caching orchestration make memory management a critical cost and performance factor for large-scale AI deployments.
Python
fromRealpython
1 month ago

Pydantic AI: Build Type-Safe LLM Agents in Python Quiz - Real Python

An interactive quiz assesses knowledge of Pydantic AI, covering type-safe LLM agents, model providers, structured outputs, tool registration, dependency injection, and production trade-offs.
fromRealpython
2 months ago

Episode #280: Considering Fast and Slow in Python Programming - The Real Python Podcast

Christopher shares an article titled "The Uselessness of 'Fast' and 'Slow' in Programming." It digs into how the different aspects of software performance span a wide range of orders of magnitude, and how developers can obsess over irrelevant performance details, often losing more time working in suboptimal environments than building what they need with tools they already know. We also discuss an article about why uv is fast, which explains how most of its speed comes from engineering decisions rather than just being written in Rust.
Web frameworks
Python
fromRealpython
1 month ago

Python Stacks, Queues, and Priority Queues in Practice Quiz - Real Python

An 11-question quiz tests understanding of Python stacks, queues, priority queues, and their real-world applications in traversal and system architecture.
Python
fromRealpython
1 month ago

Duck Typing in Python: Writing Flexible and Decoupled Code Quiz - Real Python

An interactive quiz assesses understanding of duck typing in Python, covering its definition, advantages, disadvantages, behavior-based interfaces, protocols, special methods, and alternative approaches.
fromRealpython
1 month ago

What Does Python's __init__.py Do? - Real Python

A directory without an __init__.py file becomes a namespace package, which behaves differently from a regular package and may cause slower imports. You can use __init__.py to explicitly define a package's public API by importing specific modules or functions into the package namespace.
Python
Python
fromPythonmorsels
2 months ago

All iteration is the same in Python

All Python iteration forms use the same iterator protocol; iterating over an object yields its defined iteration items (e.g., dictionary yields keys, string yields characters).
Python
fromInfoWorld
2 months ago

CPython vs. PyPy: Which Python runtime has the better JIT?

PyPy remains far faster for raw numerical workloads, but CPython's new native JIT and no-GIL builds close the gap in other workloads and enable threading.
Python
fromThepythoncodingstack
2 months ago

Planning Meals, Weekly Shop, Alternative Constructors Using Class Methods

Use alternative constructors via class methods to build Meal and WeeklyMealPlanner objects and protect internal state with read-only properties and shallow copies.
fromNedbatchelder
2 months ago

Testing: exceptions and caches

Kacper Borucki blogged about parameterizing exception testing, and linked to pytest docs and a StackOverflow answer with similar approaches. The common way to test exceptions is to use pytest.raises as a context manager, and have separate tests for the cases that succeed and those that fail. Instead, this approach lets you unify them. I tweaked it to this, which I think reads nicely: One parameterized test that covers both good and bad outcomes. Nice.
Python
fromRealpython
2 months ago

Python's pathlib Module: Taming the File System Quiz - Real Python

Use Python's pathlib module to perform common filesystem operations like path joining, iteration, file creation, writing, renaming, and extracting filename components.
[ Load more ]