Skip to content

Commit 8601699

Browse files
committed
update error.rst
1 parent b6cd0f4 commit 8601699

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+13094
-6
lines changed

build/doctrees/appetite.doctree

-20 Bytes
Binary file not shown.

build/doctrees/classes.doctree

-20 Bytes
Binary file not shown.

build/doctrees/controlflow.doctree

-70 Bytes
Binary file not shown.

build/doctrees/datastructures.doctree

-20 Bytes
Binary file not shown.

build/doctrees/environment.pickle

161 Bytes
Binary file not shown.

build/doctrees/errors.doctree

-8 Bytes
Binary file not shown.

build/doctrees/floatingpoint.doctree

-20 Bytes
Binary file not shown.

build/doctrees/index.doctree

-26 Bytes
Binary file not shown.

build/doctrees/inputoutput.doctree

-20 Bytes
Binary file not shown.

build/doctrees/interactive.doctree

-20 Bytes
Binary file not shown.

build/doctrees/interpreter.doctree

-20 Bytes
Binary file not shown.

build/doctrees/introduction.doctree

-20 Bytes
Binary file not shown.

build/doctrees/modules.doctree

-20 Bytes
Binary file not shown.

build/doctrees/stdlib.doctree

-20 Bytes
Binary file not shown.

build/doctrees/stdlib2.doctree

-20 Bytes
Binary file not shown.

build/doctrees/whatnow.doctree

-25 Bytes
Binary file not shown.

build/html/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: 39e892fb4735113d1a74a8e0a6c62658
4+
tags: fbb0d17656682115ca4d033fb2f83ba1

build/html/_sources/appetite.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _tut-intro:
2+
3+
**********************
4+
开胃菜
5+
**********************
6+
7+
如果你要用计算机做很多工作,最后你会发现有一些任务你更希望用自动化的方式进行处理。 比如,你想要在大量的文本文件中执行查找/替换,或者以复杂的方式对大量的图片进行重命名和整理。 也许你想要编写一个小型的自定义数据库、一个特殊的GUI应用程式或一个简单的小游戏。
8+
9+
如果你是一名专业的软件开发者,可能你必须使用几种C/C++/JAVA类库,并且发现通常编写/编译/测试/重新编译的周期是如此漫长。 也许你正在为这些类库编写测试用例,但是发现这是一个让人烦躁的工作。 又或者你已经完成了一个可以使用扩展语言的程式,但你并不想为此重新设计并实现一套全新的语言。
10+
11+
那么Python正是你所需要的语言。
12+
13+
虽然你能够通过编写Unix shell脚本或Windows批处理文件来处理其中的某些任务,但Shell脚本更适合移动文件或修改文本数据,并不适合编写GUI应用程序或游戏; 虽然你能够使用C/C++/JAVA编写程序,但即使编写一个简单的 first-draft 程序也有可能耗费大量的开发时间。 相比之下,Python更易于使用,无论在Windows、Mac OS X或Unix操作系统上它都会帮助你更快的完成任务。
14+
15+
虽然Python易于使用,但它却是一门完整的编程语言;与Shell脚本或批处理文件相比,它为编写大型程序提供了更多的结构和支持。 另一方面,Python提供了比C更多的错误检查,并且作为一门 * 高级语言* ,它内置支持高级的数据结构类型,例如:灵活的数组和字典。 因其更多的通用数据类型,Python比Awk甚至Perl都适用于更的多问题领域,至少大多数事情在Python中与其他语言同样简单。
16+
17+
Python允许你将程序分割为不同的模块,以便在其他的Python程序中重用。 Python内置提供了大量的标准模块,你可以将其用作程序的基础,或者作为学习Python编程的示例。 这些模块提供了诸如文件I/O、系统调用、sockets支持,甚至类似Tk的用户图形界面(GUI)工具包接口。
18+
19+
Python是一门解释型语言,因为无需编译和链接,你可以在程式开发中节省宝贵的时间。 Python解释器可以交互的使用,这使得试验语言的特性、编写临时程序或在自底向上的程序开发中测试方法非常容易。 你甚至还可以把它当做一个桌面计算器。
20+
21+
Python让程序编写的紧凑和可读。 用Python编写的程式通常比同样的C、C++或Java程式更短小,这是因为以下几个原因:
22+
23+
* 高级数据结构使你可以在一条语句中表达复杂的操作;
24+
25+
* 语句组使用缩进代替开始和结束大括号来组织;
26+
27+
* 变量或参数无需声明。
28+
29+
Python是 *可扩展* 的:如果你会C语言编程便可以轻易的为解释器添加内置函数或模块,或者为了对性能瓶颈作优化,或者将Python程序与只有二进制形式的库(比如某个专业的商业图形库)连接起来。 一旦你真正掌握了它,你可以将Python解释器集成进某个C应用程序,并把它当做那个程序的扩展或命令行语言。
30+
31+
顺便说一句,这个语言的名字来自于BBC的“Monty Python’s Flying Cirecus”节目,和爬行类动物没有任何关系。 在文档中引用Monty Python的典故不仅可行,而且值得鼓励!
32+
33+
现在你已经为Python兴奋不已了吧,大概想要领略一些更多的细节! 学习一门语言最好的方法就是使用它,本指南推荐你边读边使用Python解释器练习。
34+
35+
下一节中,我们将解释Python解释器的用法。 这是很简单的一件事情,但它有助于试验后面的例子。
36+
37+
本手册剩下的部分将通过示例介绍Python语言及系统的诸多特性,开始是简单的语法、数据类型和表达式,接着介绍函数与模块,最后涉及异常和自定义类这样的高级内容。

build/html/_sources/classes.txt

Lines changed: 552 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)