Tuesday, August 21, 2007

Python Reference Manual

1. Introduction
Alternate Implementations
Notation

2. Lexical Analysis
Line Structure
Logical Lines
Physical Lines
Comments
Encoding declarations
Explicit line joining
Implicit line joining
Blank lines
Indentation
Whitespace between tokens
Other tokens
Identifiers and keywords
Keywords
Reserved classes of identifiers
Literals
String literals
String literal concatenation
Numeric literals
Integer and long integer literals
Floating point literals
Imaginary literals
Operators
Delimeters

3. Data model
Objects, values, and types
The standard type hierarchy
New-style and classic classes
Special method names
Basic customization
Customizing attribute access
Customizing class creation
Emulating callable objects
Emulating container types
Additional methods for emulation of sequence types
Emulating numerical types
Coercion rules
With Statement Context Managers

4. Execution model
Naming and binding
Interaction with dynamic features
Exceptions

5. Expressions
Arithmetic conversions
Atoms
Identifiers(Names)
Literals
Parenthesized forms
List displays
Generator expressions
Dictionary displays
String conversions
Primaries
Attribute references
Subscriptions
Slicings
Calls
The power operator
Unary arithmetic operations
Binary arithmetic operations
Shifting operations
Binary bit-wise operations
Comparisons
Boolean operations
Lambdas
Expression lists
Evaluation order

6. Simple statements
Expression statements
Assert statements
Assignment statements
Augmented assignment statements
The "pass" statement
The "del" statement
The "print" statement
The "return" statement
The "yield" statement
The "raise" statement
The "break" statement
The "continue" statement
The "import" statement
Future statements
The "global" statement
The "exec" statement
Compound statements
The "if" statement
The "while" statement
The "for" statement
The "try" statement
The "with" statement
Function definitions
Class definitions
Top-level components
Complete Python programs
File input
Interactive input
Expression input