python2.7中文手册(cè).chm是(shì)一款强(qiáng)大的编程语言,具有简单(dān)易用的特点,python2.7是较稳(wěn)定的(de)一个版本(běn),这个python2.7中文(wén)手册由(yóu)官方发布,为(wéi)中文版本,用户(hù)可以通(tōng)过本书了解python2.7使用,可以轻松让(ràng)你学(xué)会(huì)python编程(chéng)。
Python(KK 英语(yǔ)发音:/ˈpaɪθən/)是一种面向对象、直(zhí)译式(shì)计算机程序设计语言。也是一种功能(néng)强(qiáng)大(dà)而完善的(de)通用型语言(yán),已经具有十多年的发展(zhǎn)历(lì)史,成熟且稳定(dìng)。Python 具有(yǒu)脚本语言中最丰(fēng)富(fù)和强大的类库,足(zú)以支(zhī)持绝(jué)大多数日(rì)常应用。 Python语法简捷而清晰,具(jù)有丰富和强大的类(lèi)库。它常被昵称(chēng)为胶水语言(yán),它能(néng)够很轻松的(de)把用其他(tā)语言制作的各种模块(尤其是C/C++)轻松地联结在一起。Python的名字(zì)来源于一个喜剧。也许(xǔ)最初设(shè)计Python这种语言(yán)的(de)人并没有想到Python会(huì)在工业和科研上获(huò)得如此广泛的使用。
前言 Front Matter
Contents
1. 开胃菜 Whetting Your Appetite
2. 使用Python解释(shì)器 Using the Python Interpreter
2.1 调用解释器 Invoking the Interpreter
2.1.1 参数传(chuán)递 Argument Passing
2.1.2 交互模式 Interactive Mode
2.2 解释器及其环境 The Interpreter and Its Environment
2.2.1 错误处(chù)理 Error Handling
2.2.2 执行Python脚(jiǎo)本 Executable Python Scripts
2.2.3 源程序编(biān)码(mǎ) Source Code Encoding
2.2.4 交(jiāo)互(hù)式环境的启动文件 The Interactive Startup File
3. Python简介 An Informal Introduction to Python
3.1 将Python当作计(jì)算器使用 Using Python as a Calculator
3.1.1 数值(zhí) Numbers
3.1.2 字(zì)符串 Strings
3.1.3 Unicode 字符串 Unicode Strings
3.1.4 链表 Lists
3.2 开始(shǐ)编程 First Steps Towards Programming
4. 深入流程控制 More Control Flow Tools
4.1 if 语句 if Statements
4.2 for 语句 for Statements
4.3 range() 函数(shù) 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 关键字(zì)参数(shù) Keyword Arguments
4.7.3 可变(biàn)参数表 Arbitrary Argument Lists
4.7.4 参数列表的分拆 Unpacking Argument Lists
4.7.5 Lambda 形式 Lambda Forms
4.7.6 文档(dàng)字符串 Documentation Strings
5. 数据结构 Data Structures
5.1 深入链表 More on Lists
5.1.1 把链表(biǎo)当作堆(duī)栈使用(yòng) Using Lists as Stacks
5.1.2 把链表当作队(duì)列使用 Using Lists as Queues
5.1.3 函数(shù)化编程工(gōng)具 Functional Programming Tools
5.1.4 链表(biǎo)推导(dǎo)式 List Comprehensions
5.2 del 语句
5.3 元组(Tuples)和(hé)序列(Sequences )Tuples and Sequences
5.4 Dictionaries 字典(diǎn)
5.5 循环(huán)技巧 Looping Techniques
5.6 深入条件控制 More on Conditions
5.7 比较序列和其(qí)它类型 Comparing Sequences and Other Types
6. 模(mó)块 Modules
6.1 深入模(mó)块 More on Modules
6.1.1 模块(kuài)搜索路(lù)径 The Module Search Path
6.1.2 “编译”Python文(wén)件 ``Compiled'' Python files
6.2 标准模块 Standard Modules
6.3 dir() 函数 dir() Function
6.4 包(bāo) Packages
6.4.1 以 * 方式加载(zǎi)包(bāo) Importing * From a Package
6.4.2 内(nèi)置包(Intra-package)参考 Intra-package References
6.4.3 多重路径(jìng)中的包 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. 错(cuò)误和异常(cháng) 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. 类(lèi) Classes
9.1 有(yǒu)关术语的(de)话题 A Word About Terminology
9.2 Python 作用域(yù)和命(mìng)名空(kōng)间(jiān) 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 实(shí)例对象 Instance Objects
9.3.4 方法对象(xiàng) Method Objects
9.4 一些说(shuō)明 Random Remarks
9.5 继承 Inheritance
9.5.1 多继(jì)承 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 操(cāo)作系统概览 Operating System Interface
10.2 文件通配符 File Wildcards
10.3 命令行参数 Command Line Arguments
10.4 错(cuò)误输出重定向和程序终止 Error Output Redirection and Program Termination
10.5 字符(fú)串正则匹配 String Pattern Matching
10.6 数学 Mathematics
10.7 互联网访问 Internet Access
10.8 日期和时间 Dates and Times
10.9 数据(jù)压(yā)缩 Data Compression
10.10 性能(néng)度量 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 。
这是python2.7中文(wén)手册.chm,python中文手册chm,内(nèi)容丰(fēng)富全面,不但是一(yī)本手册(cè),你完全可以(yǐ)把她作为(wéi)一本Python的入(rù)门教(jiāo)程,教你如(rú)何使用Python解释器、流程控制、数(shù)据结(jié)构(gòu)、模板、输(shū)入和(hé)输出、错(cuò)误和异常、类和标准库详解等方(fāng)面的知识技巧。同(tóng)时后附的手(shǒu)册(cè)可(kě)以(yǐ)方便你的(de)查询(xún)。
