Copyright © 2001, 2002, 2003 Python Software Foundation. All rights reserved.
Copyright © 2000 BeOpen.com. All rights reserved.
Copyright © 1995-2000 Corporation for National Research Initiatives. All rights reserved.
Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
See the end of this document for complete license and permissions information.
详细版权及使用许可的资料见本文的最后部份.
Python is an extensible, interpreted, object-oriented programming language. It supports a wide range of applications, from simple text processing scripts to interactive Web browsers.
Python 是一种可扩展的, 即译式, 面向对象规格的编程语言. 它能应用在极广泛 的地方, 从简单的文字处理工作到交互式的网页浏览器.
While the Python Reference Manual describes the exact syntax and semantics of the language, it does not describe the standard library that is distributed with the language, and which greatly enhances its immediate usability. This library contains built-in modules (written in C) that provide access to system functionality such as file I/O that would otherwise be inaccessible to Python programmers, as well as modules written in Python that provide standardized solutions for many problems that occur in everyday programming. Some of these modules are explicitly designed to encourage and enhance the portability of Python programs.
Python 语言参考手册 中精确地描述了 Python 语言的句法及语义. 然而语言参考手册中没有提到 Python 所附 带功能强大的标准库. 这个函式库大大地增强了 Python 的实用性. 其中 包括 C 写的内建模组, 提供介面让程式进行操作系统层次的工作, 例 如档案的输出输入; 同时也有以 Python 语言本身编写的模组, 为实际编程 时常遇的问题提供标准解决方案. 这类模组有的经过特别设计以便 Python 程式在跨平台的情况下运行无误.
This library reference manual documents Python's standard library, as well as many optional library modules (which may or may not be available, depending on whether the underlying platform supports them and on the configuration choices made at compile time). It also documents the standard types of the language and its built-in functions and exceptions, many of which are not or incompletely documented in the Reference Manual.
本参考手册罗列并说明了 Python 标准库的各种功能, 以及许多非核心的模组 (按不同的操作系统和编译时的设置而定, 不是每台机上的 Python 都能用这些模组.) 本手册同时记载了 Python 语言所有的标准数据类型, 内建函数, 异常类, 这些在参考手册中被忽略了或只是扼要的提过一下.
This manual assumes basic knowledge about the Python language. For an informal introduction to Python, see the Python Tutorial; the Python Reference Manual remains the highest authority on syntactic and semantic questions. Finally, the manual entitled Extending and Embedding the Python Interpreter describes how to add new extensions to Python and how to embed it in other applications.
本手册的读者要对 Python 有基本的认识. 初学者应该从 Python 指南 开始. 至于 Python 语言参考手册 则是该语言的语法 和语义问题上的权威阐释. 最后 扩展或嵌入 Python 解释器 一文解说了如何在 Python 中加入新的扩展 模组; 以及怎样把 Python 解释器嵌入到其他的应用程式中.