深入理解Python中文版高清PDF
Dive Into Python /
Div e Int o Pyt ho n
2004 年 5 月 20 日
译文版 (5.4) 2005 年 12 月—2006 年 4 月 (update-060425)
审校 (5.4b) 2007 年 6 月—9 月
Copyright © 2000, 2001, 2002, 2003, 2004 Mark Pilgrim
(mailto:mark@)
Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007 CPyUG (邮件列表)
(mailto:python-cn@)
本书存放在 / (英文原版) 和
/diveintopython(中文版)。如果你是从别的地方
看到它的,可能看到的不是最新版本。
Permission is granted to copy, distribute, and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later
version published by the Free Software Foundation; with no Invariant Sections,
no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included
in Appendix G, GNU Free Documentation License .
允许在 GNU 自由文档协议 (1.1 版,或自由软件基金会出版的任何更新版本)
的许可下复制、发行且/或修改本文档;本文档没有不变部分,没有前封面文
本,没有封底文本。该协议的一份中文版参考译文包含在 Appendix H, GNU
自由文档协议 中。
在这本书中的例程是自由软件。你可以在遵守 Python 协议 (Python 软件基金
会发布) 条款的规定下,重新发布,且/或修改它们。在 Appendix I, Python
license 中包含了此协议的一份拷贝。
本译本由 Zoom.Quiet 负责项目管理。感谢啄木鸟社区
()提供 SVN 项目空间
(/woodpecker/zh-
translations/trunk/diveintopython/zh-cn/)和 Wiki 协作空间
(/moin/DiveIntoPythonZh)。
- 1 -
Dive Into Python /
本译本由 啄木鸟/CPUG (/moin/CPUG) 的 obp 团
队完成。可以在修订历史 (appendix/history.html)中找到一个翻译和修订人员
的清单。如果您对当前版本的 Dive Into Python 中文版有任何意见和建议,可
以到本书的 Wiki 协作空间
(/moin/DiveIntoPythonZh)中留下你的评论。
本译文遵守 GFDL 的规定。你可以复制、发行、修改此文档,但请保留此版权
信息。
- 2 -
Dive Into Python /
Dive Into Python . . . . . . . . . 1
Chapte r 1. 安装 Python