Python学习导引编译(来自网页docs.python.org/3/tutorial.jtml)

标题0、Python学习导引编译(来自网页docs.python.org/3/tutorial.jtml)

Python很容易学,而且还是一个强有力的程序语言。它有高效高水准的数据结构,有简单而又行之有效的方法去进行瞄向对象的程序编制。Python优雅的语法学和动态的类型,和它可解释的特质,使之成为一个理想的语言。在当今大多数平台上,它都可以用来在很多领域作为描述工具,并迅速地通过应用而发展。
Python编译器和扩展的标准图书馆免费可用于原代码或者二进制基础,这些原代码来自于python网址http://www.python.org/的所有主流平台,并且在使用中可以免费相互传递。这个网址也含有许多免费的第三方python模块,程序和工具的指示器pointer,以及附加的文本文件。
Python解释器很容易用在C语言或者C++语言(或者是从语言中调用的其它语言)补充的新函数和数据类型来予以扩展。Python对于常规应用的扩展语言也是适合的。
这本指南不是那么严格地引导读者去理解python语言和系统的基本概念和特点。你的手边需要备有python的解释器以便于做练习,但是,所有的例子都是自我满足的,所以,这本指南你也可以离线阅读。
对于标准对象和模块的描述,可参看python标准图书馆。Python语言参考给予这个语言更为严格的定义。要在C或者C++撰写扩展,请阅读扩展和嵌入embedding的python解释器和python/C 应用程序界面API(Application program interface)参考手册。有几本深度覆盖python的著作。
这个指南没有全面覆盖python每一个特点的企图,甚至覆盖每一个常用特点的企图都没有。它引入的是python最值得注意的一些特性,它将给你一些有关这个语言所具有的风格和魅力的美好理念。阅读完这本手册,你就能够阅读与撰写python的模块和程序,然后,你就能够很方便地去学习更多的来自python标准图书馆的各种各样的模块。
这个目录表也是值得通览一下的。

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.解释器和它的环境
2.2.1.源代码编码source code encoding
3.对python的一个非正式导言
3.1.用python作为计算器
3.1.1.数字number
3.1.2.字符串string
3.1.3.列表lists
3.2.朝向编程的第一步
4.更多的流控工具more control flow tools
4.1.条件句 if statement
4.2.for循环句.for statement
4.3.范围函数range()function
4.4.中断和继续break and continue和循环中的否则句else clause on loops
4.5.通过句pass statement
4.6.定义函数defining functions
4.7.在定义函数上的更多内容
4.7.1.缺省参数值default argument values
4.7.2.关键词参数keyword arguments
4.7.3.特殊参数
4.7.3.1定位或者关键词参数positional or keywords argument
4.7.3.2.仅定位参数 positional-only parameters
4.7.3.3.仅关键词参数keyword-only arguments
4.7.3.4.函数举例
4.7.3.5.概括recap
4.7.4.任意参数列表arbitrary argument lists
4.7.5.解包参数列表unpacking argument lists
4.7.6.拉姆达表达式lambda expressions
4.7.7文件字符串documentation strings
4.7.8.函数评注function annotations
4.8.间奏曲:编码风格
5.数据结构
5.1列表的更多内容
5.1.1.把列表作为堆栈using lists as stacks
5.1.2.把列表多为队列using lists as queues
5.1.3.列表理解list comprehensions
5.1.4.嵌套列表理解nested list comprehensions
5.2.有关del的语句the del statement
5.3.元组和序列tuples and sequence
5.4.集合sets
5.5.词典dictonaries
5.6.循环技巧 looping techniques
5.7.有关条件的更多内容
5.8.比较序列和其它类型comparing sequences and other types
6.模块
6.1.更多的模块内容more on modules
6.1.1.把模块处理为脚本executing modules as scripts
6.1.2.寻找路径的模块the module search path
6.1.3.“编辑”python文件
6.2.标准模块
6.3.目录函数the dir() function
6.4.封包packages
6.4.1.从一个封包导入importing from a package
6.4.2.内封包参考intra-package references
6.4.3.在多目录中封包packages in multiple directories
7.输入和输出input and output
7.1.爱好者输出格式化fancier output formatting
7.1.1.格式化字符串文字formatted string literals
7.1.2.字符串格式化()方法the string format() method
7.1.3.手动字符串格式化manual string formatting
7.1.4.旧式字符串格式化old string formatting
7.2.阅读与书写文件
7.2.1.文件对象方法methods of file objects
7.2.2.用json保存结构数据saving structured data with json
8.错误与异常error and exceptions
8.1.语法错误syntax errors
8.2.异常exceptions
8.3.处理异常handling exceptions
8.4.引起异常raising exception
8.5.用户定义异常user-defined exception
8.6.定义清除行为defining clean-up actions
8.7.预定义清除行为predefined clean-up actions
9…类classes
9.1.有关名称与对象的单词a word about names and objects
9.2.python范围和名称空间python scopes and namespaces
9.2.1.范围和名称空间实例
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.3.5.类与实例变元class and instances variables
9.4.随意的评注random remarks
9.5.继承inheritance
9.5.1.多重继承multiple inheritance
9.6.私有变元private variables
9.7.优势与终结odds and ends
9.8.迭代器iterators
9.9.生成器generators
9.10.生成器表达式generator expressions
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.数学
10.7.内部登录internal access
10.8.数据与时间data and times
10.9.数据压缩data compression
10.10.操作测度performance measurement
10.11.量控制quality control
10.12.电池包括
11.对标准图书馆的简单浏览第二部分
11.1.输出格式化output formatting
11.2.模块化templating
11.3.用二元录制图版工作working with binary record layouts
11.4.多重线程multiple-threading
11.5.记录logging
11.6.弱参考weak references
11.7.用列表做事的工具tools for working with lists
11.8.十进制浮点算术decimal floating point arithmetic
12.虚拟环境和封包virtual environment and packages
12.1.导言introduction
12.2.创建虚拟环境creating virtual environments
12.3.用pip管理封包managing packages with pip
13.还有什么?what now?
14.接口输入编辑和历史替代interactive input editing and history substitution
14.1.空格补充和历史编辑tab completion and history editing
14.2.对交互解释器的选择alternatives to the interactive interpreter
15.浮点算术和限度floating point arithmetic and limitations
15.1.呈现错误representation error
16.附录appendix
16.1.交互模式interactive mode
16.1.1.错误处理error handling
16.1.2.可处理的python脚本executable python scripts
16.1.3.交互式启动文件the interactive startup files
16.1.4.常规模式the customization modules

猜你喜欢

转载自blog.csdn.net/weixin_41670255/article/details/108234599
今日推荐