
1
Chapter 1
Python Pocket Reference
Introduction
Python is a general-purpose, object-oriented, and open
source computer programming language. It is commonly
used for both standalone programs and scripting applica-
tions in a wide variety of domains, by hundreds of thou-
sands of developers.
Python is designed to optimize developer productivity, soft-
ware quality, program portability, and component integra-
tion. Python programs run on most platforms in common
use, including mainframes and supercomputers, Unix and
Linux, Windows and Macintosh, Palm OS and Pocket PC,
Java and .NET, and more.
This pocket reference summarizes Python statements and
types, built-in functions, commonly used library modules,
and other prominent Python tools. It is intended to serve as a
concise reference tool for developers and is designed to be a
companion to other books that provide tutorials, code exam-
ples, and other learning materials.
This third edition covers Python Version 2.4 and later. It has
been thoroughly updated for recent language and library
changes and expanded for new topics. Most of it applies to
earlier releases as well, with the exception of recent language
extensions.