Skip to content

Latest commit

 

History

History

python_3_3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Python 3.3 Overview & Features

Release Date: September 29, 2012
Key Focus: Syntax simplification (yield from), Environment Isolation (venv), Network IP handling (ipaddress), and CPython internal optimizations.


🚀 Key Features & Syntax Additions

1. yield from Expression (PEP 380)

Allows a generator to delegate part of its operations to another generator.

  • Simplifies nested generator code significantly.
  • Supports returning values from sub-generators.

2. Standard Virtual Environments (venv) (PEP 405)

Introduced the venv module natively into the Python standard library, enabling lightweight virtual environments without needing third-party tools like virtualenv.

3. Native IPv4/IPv6 Manipulation (ipaddress) (PEP 3144)

Added the ipaddress module to inspect, validate, and manipulate IP addresses, subnets, and networks seamlessly.

4. Implicit Namespace Packages (PEP 420)

Directories without an __init__.py file can now be imported as Python namespace packages across multiple directories or sys.path locations.

5. Unicode Syntax Restoration u'...' (PEP 414)

Restored u'string' literal syntax to ease migration of legacy Python 2 codebases to Python 3.

6. Read-only Mapping Views (types.MappingProxyType)

Provides a read-only dynamic proxy view of a dictionary to prevent modification of protected mappings.


🛠️ Summary Table of Important PEPs

PEP Feature Description
PEP 380 yield from Generator delegation syntax
PEP 405 venv module Built-in virtual environment support
PEP 3144 ipaddress module IP address & network manipulation
PEP 420 Namespace Packages Directories without __init__.py as packages
PEP 393 Flexible String Representation Compact internal unicode representation (saves memory)
PEP 415 faulthandler Dump C tracebacks on crash/segfault

💻 Pythonic Code Showcase

Check main_3_3.py in this directory for runnable code examples demonstrating:

  • Delegating generators with yield from
  • Working with ipaddress.ip_network and ipaddress.ip_address
  • Using types.MappingProxyType for immutable dict views
  • Locating system executables with shutil.which