Release Date: March 16, 2014
Key Focus: Asynchronous I/O framework (asyncio), Object-oriented filesystem paths (pathlib), Enumerations (enum), and Standard Statistics (statistics).
Introduced the pathlib module providing clean, object-oriented semantics for navigating, inspecting, and manipulating filesystem paths across different operating systems.
Added enum.Enum, enum.IntEnum, and enum.Flag to the standard library, providing robust support for type-safe, iterable constant enumerations.
Introduced asyncio (initially provisional, codenamed "Tulip"), introducing event loops, coroutines (@asyncio.coroutine), and futures into Python's core library.
Allows function overloading based on the type of the first argument, enabling elegant polymophic function implementations in pure Python.
Added built-in statistical functions such as mean, median, mode, variance, and stdev.
pip is automatically installed with Python binary installers via ensurepip.
| PEP | Feature | Description |
|---|---|---|
| PEP 428 | pathlib module |
Object-oriented filesystem paths |
| PEP 435 | enum module |
Standard implementation for enumerations |
| PEP 3156 | asyncio module |
Asynchronous I/O, event loops, and coroutines |
| PEP 443 | singledispatch |
Single-dispatch generic functions in functools |
| PEP 450 | statistics module |
Built-in statistical mathematical calculations |
| PEP 454 | tracemalloc module |
Trace memory allocations for debugging leaks |
Check main_3_4.py in this directory for runnable code examples demonstrating:
- Object-oriented path operations with
pathlib.Path - Creating and using
enum.Enum&enum.auto - Polymorphic functions with
@singledispatch - Basic statistical operations with
statistics