1.1 Python Overview:Python的概述


Building data structures and algorithms requires that we communicate detailed instructions to a computer. An excellent way to perform such communications is using a high-level computer language,such as Python. The Python programming language was originally developed by Guido van Rossum in the early 1990s, and has since become a prominently used language in industry and education. The second major version of the language, Python 2, was released in 2000, and the third major version, Python 3, released in 2008. We note that there are significant incompatibilities between Python 2 and Python 3. This book is based on Python 3 (more specifically, Python 3.1 or later). The latest version of the language is freely available at www.python.org, along with documentation and tutorials.


构建数据结构和算法需要我们传达给一台计算机详细的指令。使用一种高级计算机语言是一个很好的方式来执行这样的通信,比如Python。Python编程语言最初是由Guido van Rossum在1990年代初开发的,并从此成为工业与教育突出使用的语言。Python 2是第二个主要版本的语言,在2000年发布,Python 3是第三个主要版本,在2008年发布。我们注意到 Python 2和 Python 3 之间的显著不兼容。这本书基于 Python 3 (更具体地说,Python 3.1 或更高版本)。最新版本是在www.python.org上免费提供,还有文档和教程。


In this chapter, we provide an overview of the Python programming language,and we continue this discussion in the next chapter, focusing on object-orientedprinciples. We assume that readers of this book have prior programming experience, although not necessarily using Python. This book does not provide a complete description of the Python language (there are numerous language references for that purpose), but it does introduce all aspects of the language that are used in code fragments later in this book.


在这一章,我们提供Python编程语言的概述,我们在下一章继续讨论,侧重于面向对象原则。我们假设这本书的读者已有编程经验,虽然不一定使用 Python。这本书并没有提供一个完整的Python语言的描述(有许多语言引用为此目的),但在这本书的后面代码片段中引入了Python语言使用的方方面面。