Python Tutorial
Up:
Python Documentation Index
Next:
ǰ�� Front Matter
Python Tutorial
ǰ�� Front Matter
Contents
1. ��� Whetting Your Appetite
2. ʹ��Python������ Using the Python Interpreter
2.1 ���ý����� Invoking the Interpreter
2.1.1 �������� Argument Passing
2.1.2 ����ģʽ Interactive Mode
2.2 ���������价�� The Interpreter and Its Environment
2.2.1 ������ Error Handling
2.2.2 ִ��Python�ű� Executable Python Scripts
2.2.3 Դ������� Source Code Encoding
2.2.4 ����ʽ�����������ļ� The Interactive Startup File
3. Python��� An Informal Introduction to Python
3.1 ��Python����������ʹ�� Using Python as a Calculator
3.1.1 ��ֵ Numbers
3.1.2 �ַ��� Strings
3.1.3 Unicode �ַ��� Unicode Strings
3.1.4 ���� Lists
3.2 ��ʼ��� First Steps Towards Programming
4. �������̿��� More Control Flow Tools
4.1
if
���
if
Statements
4.2
for
���
for
Statements
4.3
range()
���� The
range()
Function
4.4
break
��
continue
���, �Լ� Ñ���е�
else
�Ӿ�
break
and
continue
Statements, and
else
Clauses on Loops
4.5
pass
���
pass
Statements
4.6 Defining Functions
4.7 ���뺯������ More on Defining Functions
4.7.1 ����Ĭ��ֵ Default Argument Values
4.7.2 �ؼ��ֲ��� Keyword Arguments
4.7.3 �ɱ������ Arbitrary Argument Lists
4.7.4 �����б��ķֲ� Unpacking Argument Lists
4.7.5 Lambda ��ʽ Lambda Forms
4.7.6 �ĵ��ַ��� Documentation Strings
5. ���ݽṹ Data Structures
5.1 �������� More on Lists
5.1.1 ������������ջʹ�� Using Lists as Stacks
5.1.2 ��������������ʹ�� Using Lists as Queues
5.1.3 ��������̹��� Functional Programming Tools
5.1.4 �����Ƶ�ʽ List Comprehensions
5.2
del
���
5.3 Ԫ�飨Tuples�������У�Sequences ��Tuples and Sequences
5.4 Dictionaries �ֵ�
5.5 ������ Looping Techniques
5.6 ������������ More on Conditions
5.7 �Ƚ����к��������� Comparing Sequences and Other Types
6. ģ�� Modules
6.1 ����ģ�� More on Modules
6.1.1 ģ������·�� The Module Search Path
6.1.2 �����롱Python�ļ� ``Compiled'' Python files
6.2 ��׼ģ�� Standard Modules
6.3
dir()
����
dir()
Function
6.4 �� Packages
6.4.1 �� * ��ʽ���ذ� Importing * From a Package
6.4.2 ���ð���Intra-package���ο� Intra-package References
6.4.3 ����·���еİ� Packages in Multiple Directories
7. �������� Input and Output
7.1 ��������ʽ Fancier Output Formatting
7.2 ��д�ļ� Reading and Writing Files
7.2.1 �ļ�����file object���ķ��� Methods of File Objects
7.2.2
pickle
ģ��
pickle
Module
8. ������쳣 Errors and Exceptions
8.1 �쳣 Exceptions
8.2 �����쳣 Handling Exceptions
8.3 �׳��쳣 Raising Exceptions
8.4 �û��Զ����쳣 User-defined Exceptions
8.5 ����������Ϊ Defining Clean-up Actions
9. �� Classes
9.1 �й�����Ļ��� A Word About Terminology
9.2 Python ������������ռ� Python Scopes and Name Spaces
9.3 ��ʶ�� A First Look at Classes
9.3.1 �ඨ���﷨ Class Definition Syntax
9.3.2 ����� Class Objects
9.3.3 ʵ������ Instance Objects
9.3.4 �������� Method Objects
9.4 һЩ˵�� Random Remarks
9.5 �̳� Inheritance
9.5.1 ��̳� Multiple Inheritance
9.6 ˽�б��� Private Variables
9.7 ���� Odds and Ends
9.8 �쳣Ҳ���� Exceptions Are Classes Too
9.9 ������ Iterators
9.10 ������ Generators
10. ��׼����� Brief Tour of the Standard Library
10.1 ����ϵͳ���� Operating System Interface
10.2 �ļ�ͨ��� File Wildcards
10.3 ������� Command Line Arguments
10.4 ��������ض���ͳ�����ֹ Error Output Redirection and Program Termination
10.5 �ַ�������ƥ�� String Pattern Matching
10.6 ��ѧ Mathematics
10.7 ���������� Internet Access
10.8 ���ں�ʱ�� Dates and Times
10.9 ����ѹ�� Data Compression
10.10 ���ܶ��� Performance Measurement
10.11 �������� Quality Control
10.12 Batteries Included
11. What Now?
A. Interactive Input Editing and History Substitution
A.1 Line Editing
A.2 History Substitution
A.3 Key Bindings
A.4 Commentary
B. Floating Point Arithmetic: Issues and Limitations
B.1 Representation Error
C. History and License
D. Glossary
About this document ...
Python Tutorial
Up:
Python Documentation Index
Next:
ǰ�� Front Matter
���ߣ�����(march.liu AT gmail DOT com) �ɣ�limodouת(limodou AT gmail DOT com)
See
About this document...
for information on suggesting changes.