PDF源文件地址 :  http://www.greenteapress.com/thinkpython/thinkpython.pdf

贡献列表

自从本书诞生之后,有超过上百个目光敏锐且有想法的读者给我发来了许多建议并指出了一些需要修正的地方。他们的热情和无私的奉献给了我巨大的帮助。如果你有任何建议或者发现需要修正的地方,请发邮件至:feedback@thinkpython.com。如果您的建议被采纳,您的大名将会出现在我们的贡献人员列表(除非你本人过于低调拒绝承认).如果您发现文中的错误内容,敬请提供一下出错的关键语句,或者章节和页码,这样方便我们及时准确的找到问题所在。感谢!

[接下来的原文就是一段很长的篇幅介绍每一个为本书作出贡献的人员姓名,以及他们做过的具体事情,为了体现精简的原则,我就不一一翻译了,一是我觉得没必要,二是我即便翻译了,您也没时间看,通常拿到手一本书,序言是90%以上的人都懒得翻看的。
因此为了节省篇幅和时间,我只提一个人Patryk Wolowiec,这位哥们把整本书转换成了HTML版本,如今官网这本书就是用他的。
因此,希望对比原版英文进行阅读的朋友可以点击这个传送门:
http://www.greenteapress.com/thinkpython/html/index.html

再接下来就是目录,虽然内容多,您也不一定有耐心逐个看,但是我还是觉得有必要翻译一下,因为我本人想先了解一下整本书的框架结构和大致内容。再者待我翻译到后面章节的内容,如果发现翻译得不恰当,我还会修改更正这里目录内容。

后记:原本以为不会花费太多时间翻译目录这一块,结果花了好几个晚上的时间对每一个小标题进行逐个理解,由于平时写程序对这些术语概念不求甚解,所以翻译的过程中不断的重复着:查看原文内容揣测标题含义,各种翻译工具进行比较... ... 不过总算翻完了!如有翻译得不合适的地方,敬请各位指正!]


目录 Contents

 

1 编程方法 The way of the program

1.1 Python 编程语言   The Python programming language
1.2 什么是程序?     What is a program?
1.3 什么是调试?     What is debugging?
1.4 形式语言和自然语言   Formal and natural languages
1.5 第一个程序       The first program
1.6 调试   Debugging
1.7 术语表   Glossary
1.8 练习   Exercises

2 变量, 表达式和语法 Variables, expressions and statements

2.1 值和类型   Values and types
2.2 变量     Variables
2.3 变量名和关键字   Variable names and keywords
2.4 运算符和运算     Operators and operands
2.5 表达式和语法   Expressions and statements
2.6 交互模式和脚本模式   Interactive mode and script mode
2.7 运算顺序   Order of operations
2.8 字符串操作   String operations
2.9 注释     Comments
2.10 调试     Debugging
2.11 术语表    Glossary
2.12 练习   Exercises

3 函数 Functions

3.1 函数调用 Function calls
3.2 类型转换函数 Type conversion functions
3.3 数学函数 Math functions
3.4 类组合 Composition
3.5 建立新函数 Adding new functions
3.6 定义和引用 Definitions and uses
3.7 执行流程 Flow of execution
3.8 形参和实参 Parameters and arguments
3.9 变量和形参是局部的 Variables and parameters are local
3.10 堆栈图 Stack diagrams
3.11 又返回结果函数和无返回结果函数 Fruitful functions and void functions
3.12 什么是函数 Why functions?
3.13 用from导入 Importing with from
3.14 调试 Debugging
3.15 术语表 Glossary
3.16 练习 Exercises

4 学习案例:接口设计 Case study: interface design

4.1 [Swampy包] - TurtleWorld TurtleWorld
4.2 简单循环 Simple repetition
4.3 练习 Exercises
4.4 封装 Encapsulation
4.5 泛化 Generalization
4.6 接口设计 Interface design
4.7 重构 Refactoring
4.8 开发方案 A development plan
4.9 文档字符串 docstring
4.10 调试 Debugging
4.11 术语表 Glossary
4.12 练习 Exercises

5 条件和递归 Conditionals and recursion

5.1 求余运算符 Modulus operator
5.2 布尔表达式 Boolean expressions
5.3 逻辑运算符 Logical operators
5.4 条件执行 Conditional execution
5.5 选择执行 Alternative execution
5.6 链式条件 Chained conditionals
5.7 嵌入条件 Nested conditionals
5.8 递归 Recursion
5.9 递归函数堆栈图 Stack diagrams for recursive functions
5.10 无限递归 Infinite recursion
5.11 键盘输入 Keyboard input
5.12 调试 Debugging
5.13 术语表 Glossary
5.14 练习 Exercises

6 有返回值函数 Fruitful functions

6.1 返回值 Return values
6.2 增量开发 Incremental development
6.3 类组合 Composition
6.4 布尔函数 Boolean functions
6.5 更多递归 More recursion
6.6 胸有成竹/得心应手 Leap of faith
6.7 又一个例子 One more example
6.8 检查类型 Checking types
6.9 调试 Debugging
6.10 术语表 Glossary
6.11 练习 Exercises

7 迭代 Iteration

7.1 多次赋值 Multiple assignment
7.2 更新变量 Updating variables
7.3 while语句 The while statement
7.4 break用法 break
7.5 平方根 Square roots
7.6 算法 Algorithms
7.7 调试 Debugging
7.8 术语表 Glossary
7.9 练习 Exercises

8 字符串 Strings

8.1 字符串序列 A string is a sequence
8.2 len用法 len
8.3 for循环遍历 Traversal with a for loop
8.4 字符串分割 String slices
8.5 字符串是不可变的 Strings are immutable
8.6 搜索 Searching
8.7 循环计数 Looping and counting
8.8 字符串方法 String methods
8.9 in操作 The in operator
8.10 字符串比较 String comparison
8.11 调试 Debugging
8.12 术语表 Glossary
8.13 练习 Exercises

9 案例学习:单词游戏 Case study: word play

9.1 读取单词列表 Reading word lists
9.2 练习 Exercises
9.3 搜索 Search
9.4 索引循环 Looping with indices
9.5 调试 Debugging
9.6 术语表 Glossary
9.7 练习 Exercises

10 列表 Lists

10.1 列表是一个序列 A list is a sequence
10.2 列表是可变的 Lists are mutable
10.3 遍历列表 Traversing a list
10.4 列表运算 List operations
10.5 列表分割 List slices
10.6 列表方法 List methods
10.7 映射,过滤和缩减 Map, filter and reduce
10.8 删除元素 Deleting elements
10.9 列表和字符串 Lists and strings
10.10 对象和值 Objects and values
10.11 别名 Aliasing
10.12 实参列表 List arguments
10.13 调试 Debugging
10.14 术语表 Glossary
10.15 练习 Exercises

11 字典 Dictionaries

11.1 字典——计数器集合 Dictionary as a set of counters
11.2 循环和字典 Looping and dictionaries
11.3 逆向查找 Reverse lookup
11.4 字典和列表 Dictionaries and lists
11.5 备忘录 Memos
11.6 全局变量 Global variables
11.7 长整型 Long integers
11.8 调试 Debugging
11.9 术语表 Glossary
11.10 练习 Exercises

12 元组 Tuples

12.1 元组是不可变的 Tuples are immutable
12.2 元组赋值 Tuple assignment
12.3 元组作为返回值 Tuples as return values
12.4 可变长度实参元组 Variable-length argument tuples
12.5 列表和元组 Lists and tuples
12.6 字典和元组 Dictionaries and tuples
12.7 比较元组 Comparing tuples
12.8 序列的序列 Sequences of sequences
12.9 调试 Debugging
12.10 术语表 Glossary
12.11 练习 Exercises

13 案例学习:数据结构选择 Case study: data structure selection

13.1 词频分析 Word frequency analysis
13.2 随机数 Random numbers
13.3 单词直方图 Word histogram
13.4 最常用单词 Most common words
13.5 可选形参 Optional parameters
13.6 字典差集 Dictionary subtraction
13.7 随机单词 Random words
13.8 马尔可夫分析 Markov analysis
13.9 数据结构 Data structures
13.10 分析 Debugging
13.11 词汇表 Glossary
13.12 练习 Exercises

14 文件 Files

14.1 持久化 Persistence
14.2 读和写 Reading and writing
14.3 格式化操作 Format operator
14.4 文件名和路径 Filenames and paths
14.5 捕获异常 Catching exceptions
14.6 数据库 Databases
14.7 pickle用法 Pickling
14.8 管道 Pipes
14.9 编写模块 Writing modules
14.10 调试 Debugging
14.11 术语表 Glossary
14.12 练习 Exercises

15 类和对象 Classes and objects

15.1 用户自定义类型 User-defined types
15.2 属性 Attributes
15.3 矩形 Rectangles
15.4 实例作为返回值 Instances as return values
15.5 对象是可变的 Objects are mutable
15.6 复制 Copying
15.7 调试 Debugging
15.8 术语表 Glossary
15.9 练习 Exercises

16 类和函数 Classes and functions

16.1 时间类 Time
16.2 纯函数 Pure functions
16.3 类方法 Modifiers
16.4 原型vs计划 Prototyping versus planning
16.5 调试 Debugging
16.6 术语表 Glossary
16.7 练习 Exercises

17 类和方法 Classes and methods

17.1 面向对象的特征 Object-oriented features
17.2 打印对象 Printing objects
17.3 另一个例子 Another example
17.4 一个更复杂的例子 A more complicated example
17.5 init方法 The init method
17.6 __str__方法 The __str__ method
17.7 运算符重载 Operator overloading
17.8 类型分发 Type-based dispatch
17.9 多态 Polymorphism
17.10 调试 Debugging
17.11 接口和实现 Interface and implementation
17.12 术语表 Glossary
17.13 练习 Exercises

18 继承 Inheritance

18.1 牌对象 Card objects
18.2 类属性 Class attributes
18.3 比大小Comparing cards
18.4 一副牌 Decks
18.5 打印一副牌 Printing the deck
18.6 新增,删除,洗牌和排序 Add, remove, shuffle and sort
18.7 继承Inheritance
18.8 类图 Class diagrams
18.9 调试 Debugging
18.10 数据封装 Data encapsulation
18.11 术语表 Glossary
18.12 练习 Exercises

19 案例学习:Tkinter Case study: Tkinter

19.1 图形用户界面 GUI
19.2 按钮和回调函数 Buttons and callbacks
19.3 画布组件 Canvas widgets
19.4 坐标 Coordinate sequences
19.5 更多组件 More widgets
19.6 打包组件 Packing widgets
19.7 菜单和可调用对象 Menus and Callables
19.8 绑定 Binding
19.9 调试 Debugging
19.10 术语表 Glossary
19.11 练习 Exercises

A 调试 Debugging

A.1 语法错误 Syntax errors
A.2 运行时错误 Runtime errors
A.3 语义错误 Semantic errors

B 算法分析 Analysis of Algorithms

B.1 阶数增长 Order of growth
B.2 基本Python运算分析 Analysis of basic Python operations
B.3 搜索算法分析 Analysis of search algorithms
B.4 哈希表 Hashtables


C Lumpy的用法 Lumpy

C.1 状态图 State diagram
C.2 堆栈图 Stack diagram
C.3 对象图 Object diagrams
C.4 函数和类对象 Function and class objects
C.5 类图 Class Diagrams

 

 

10-12 23:43