Language ReferenceΒΆ
This section covers Python language features, design patterns, standard library modules, and internal details like the AST and time complexity of built-in operations. It is a mix of explanations, proposals, and discussions β some of it historical, some still useful as reference. If you want to understand how a particular feature works under the hood, or why Python made the design choices it did, look here.
Core Language FeaturesΒΆ
Decorators β syntax, use cases, and links to the decorator library on PyPI
Generators β how generator functions work and how to use them as iterators
Iterator β the iterator protocol,
__iter__and__next__explainedWith Statement β discussion of PEP 343 and context managers
Abstract Base Classes β the proposed Python 3K class tree
Switch Statement β historical proposals for adding switch/case to Python
Alternate Lambda Syntax β community proposals for lambda alternatives before Python 3
AST and InternalsΒΆ
AST β overview of Pythonβs Abstract Syntax Tree for source analysis
AST-Based Optimization β performing peephole optimizations at the AST level instead of bytecode
Byteplay Documentation β docs for the byteplay bytecode manipulation library
Patterns and DesignΒΆ
Observer Pattern β implementing the observer pattern in Python
Adapter Registry β a component that adapts one interface to another
Computed Attributes Using Property Objects β using
property()for computed attributesAlternative Description of Property β another take on how Python properties work
Configuration ParsingΒΆ
ConfigParser β overview of the ConfigParser module and its design
ConfigParser Examples β basic usage examples for configparser
ConfigParser Goals β separating in-memory config from persistent storage
ConfigParser Shootout β comparing ConfigParser alternatives and debating future directions
Path HandlingΒΆ
Alternative Path Class β directory-based path classes as an alternative to PEP 355
Alternative Path Discussion β community discussion on path class design decisions
Alternative Path Module β source code for the proposed alternative path module
Alternative Path Module Tests β test suite for the alternative path module
Data and TextΒΆ
Data Representation β working with data on the web and in Python
Structured Text β StructuredText markup language resources and discussion
Structured Text β creating rich documents without explicit markup
Structure Annotation β annotating web page regions to map onto data structures
Language Parsing β evaluation of different parser libraries available for Python
ConcurrencyΒΆ
Concurrency β collected resources on concurrent programming in Python
Concurrency β overview of concurrency approaches and threading
Performance ReferenceΒΆ
Time Complexity β Big-O time and space complexity for Python built-in types
Time Complexity (Set Code) β analysis and implementation notes for set operation complexity