Python Tutorial
Previous:
Front Matter 前言
Up:
Python Tutorial
Next:
1. Whetting Your Appetite
Contents
1. Whetting Your Appetite 开胃菜
2. Using the Python Interpreter 使用Python解释器
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 Executable Python Scripts 执行Python脚本
2.2.3 Source Code Encoding 源程序编码
2.2.4 The Interactive Startup File 交互式环境的启动文件
3. More Control Flow Tools 深入流程控制
3.1 if Statements
3.2 for Statements for 语句
3.3 The range() Function range()函数
3.4 break and continue Statements, and else Clauses on Loops break 和 continue 语句, 以及 循环中的 else 子句
3.5 pass Statements pass 语句
3.6 Defining Functions 定义函数
3.7 More on Defining Functions 深入函数定义
3.7.1 Default Argument Values 参数默认值
3.7.2 Keyword Arguments
3.7.3 Arbitrary Argument Lists 可变参数列表
3.7.4 Unpacking Argument Lists 参数列表的分拆
3.7.5 Lambda Forms Lambda 形式
3.7.6 Documentation Strings 文档字符串
4. Data Structures 数据结构
4.1 More on Lists 深入链表
4.1.1 Using Lists as Stacks 把链表当作堆栈使用
4.1.2 Using Lists as Queues 把链表当作队列使用
4.1.3 Functional Programming Tools 函数化编程工具
4.1.4 List Comprehensions 链表推导式
4.2 The del statement del语句
4.3 Tuples and Sequences 元组和序列
4.4 Sets 集合
4.5 Dictionaries 字典
4.6 Looping Techniques 循环技术
4.7 More on Conditions 深入条件控制
4.8 Comparing Sequences and Other Types 不同序列类型的比较
5. Modules 模块
5.1 More on Modules 深入模块
5.1.1 The Module Search Path 模块搜索路径
5.1.2 ``Compiled'' Python files Python“编译”文件
5.2 Standard Modules 标准模块
5.3 The dir() Function dir() 函数
5.4 Packages 包
5.4.1 Importing * From a Package
5.4.2 Intra-package References 内置包(Intra-package)参考
5.4.3 Packages in Multiple Directories 多重路径中的包
6. Input and Output 输入和输出
6.1 Fancier Output Formatting 设计输出格式
6.2 Reading and Writing Files 读写文件
6.2.1 Methods of File Objects 文件方法对象
6.2.2 The pickle Module pickle 模块
7. Errors and Exceptions 错误和异常
7.1 Syntax Errors 语法错误
7.2 Exceptions 异常
7.3 Handling Exceptions 处理异常
7.4 Raising Exceptions 抛出异常
7.5 User-defined Exceptions 用户自定义异常
7.6 Defining Clean-up Actions 定义清理行为
7.7 Predefined Clean-up Actions 预定义清理行为
8. Classes 类
8.1 A Word About Terminology 术语漫谈
8.2 Python Scopes and Name Spaces 作用域和命名空间
8.3 A First Look at Classes 初识类
8.3.1 Class Definition Syntax 类定义语法
8.3.2 Class Objects 类对象
8.3.3 Instance Objects 实例对象
8.3.4 Method Objects 方法对象
8.4 Random Remarks 一些说明
8.5 Inheritance 继承
8.5.1 Multiple Inheritance 多继承
8.6 Private Variables 私有变量
8.7 Odds and Ends 补充
8.8 Exceptions Are Classes Too 异常也是类
8.9 Iterators 迭代器
8.10 Generators 生成器
8.11 Generator Expressions 生成器表达式
9. Brief Tour of the Standard Library 标准库概览
9.1 Operating System Interface 操作系统接口
9.2 File Wildcards 文件通配符
9.3 Command Line Arguments 命令行参数
9.4 Error Output Redirection and Program Termination 错误输出重定向和程序终止
9.5 String Pattern Matching 字符串正则匹配
9.6 Mathematics 数学
9.7 Internet Access 互联网访问
9.8 Dates and Times 日期和时间
9.9 Data Compression 数据压缩
9.10 Performance Measurement 性能度量
9.11 Quality Control 质量控制
9.12 Batteries Included
10. Brief Tour of the Standard Library - Part II 标准库概览
10.1 Output Formatting 格式化输出
10.2 Templating 模版
10.3 Working with Binary Data Record Layouts 使用二进制记录层
10.4 Multi-threading 多线程
10.5 Logging 日志
10.6 Weak References 弱引用
10.7 Tools for Working with Lists 链表工具
10.8 Decimal Floating Point Arithmetic 十进制浮点数算法
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
C.1 History of the software
C.2 Terms and conditions for accessing or otherwise using Python
C.3 Licenses and Acknowledgements for Incorporated Software
C.3.1 Mersenne Twister
C.3.2 Sockets
C.3.3 Floating point exception control
C.3.4 MD5 message digest algorithm
C.3.5 Asynchronous socket services
C.3.6 Cookie management
C.3.7 Profiling
C.3.8 Execution tracing
C.3.9 UUencode and UUdecode functions
C.3.10 XML Remote Procedure Calls
D. Glossary
Index
Python Tutorial
Previous:
Front Matter 前言
Up:
Python Tutorial
Next:
1. Whetting Your Appetite
Release 2.4.3, documentation updated on 29 March 2006.
See
About this document...
for information on suggesting changes.