Next:
Whetting Your Appetite
Up:
Python Tutorial
Previous:
Python Tutorial
Contents
Whetting Your Appetite
Where From Here
Using the Python Interpreter
Invoking the Interpreter
Argument Passing
Interactive Mode
The Interpreter and its Environment
Error Handling
The Module Search Path
``Compiled'' Python files
Executable Python scripts
The Interactive Startup File
Interactive Input Editing and History Substitution
Line Editing
History Substitution
Key Bindings
Commentary
An Informal Introduction to Python
Using Python as a Calculator
Numbers
Strings
Lists
First Steps Towards Programming
More Control Flow Tools
If Statements
For Statements
The range() Function
Break and Continue Statements, and Else Clauses on Loops
Pass Statements
Defining Functions
Odds and Ends
More on Lists
The del statement
Tuples and Sequences
Dictionaries
More on Conditions
Comparing Sequences and Other Types
Modules
More on Modules
Standard Modules
The dir() function
Output Formatting
Errors and Exceptions
Syntax Errors
Exceptions
Handling Exceptions
Raising Exceptions
User-defined Exceptions
Defining Clean-up Actions
Classes
A word about terminology
Python scopes and name spaces
A first look at classes
Class definition syntax
Class objects
Instance objects
Method objects
Random remarks
Inheritance
Multiple inheritance
Odds and ends
Recent Additions
The Last Printed Expression
String Literals
Double Quotes
Continuation Of String Literals
Triple-quoted strings
String Literal Juxtaposition
The Formatting Operator
Basic Usage
Referencing Variables By Name
Optional Function Arguments
Default Argument Values
Arbitrary Argument Lists
Lambda And Functional Programming Tools
Lambda Forms
Map, Reduce and Filter
Map.
Filter.
Reduce.
Continuation Lines Without Backslashes
Regular Expressions
Generalized Dictionaries
Miscellaneous New Built-in Functions
Else Clause For Try Statement
New Class Features in Release 1.1
New Operator Overloading
Trapping Attribute Access
Calling a Class Instance
New in Release 1.2
New Class Features
Unix Signal Handling
Exceptions Can Be Classes
Object Persistency and Object Copying
Persistent Objects
Copying Objects
Documentation Strings
Customizing Import and Built-Ins
Python and the World-Wide Web
Miscellaneous
New in Release 1.3
Keyword Arguments
Changes to the WWW and Internet tools
Other Language Changes
Changes to Built-in Operations
Library Changes
Other Changes
About this document ...
guido@cwi.nl