Python
Definition: Python is an object-oriented, open-source programming language often used for rapid application development. Python’s simple syntax emphasizes readability, reducing the cost of program maintenance, while its large library of functions and calls encourages reuse and extensibility.
Among the languages favored by Web developers and innovators, particularly those in the open-source community, three of the most popular are Perl, PHP and Python. Though Perl and PHP are more mentioned, but we cannot neglect Python, which is emerging as a powerful alternative to the more traditional choices.
Python is attractive because of its ease of use; its high level of abstraction from the hardware; its extensive support for housekeeping activities such as I/O, memory management, data typing and variable binding; and, perhaps most important, the fact that programmers can be highly productive with the language.
Python was created in the late 1980s by Dutch programmer Guido van Rossum and was named after the BBC television comedy series Monty Python's Flying Circus.
You can consider Python either a scripting language or a “regular” programming language. It offers an interactive mode for quick development and testing, as well as a noninteractive mode for ease of reuse.
In fact, Python doesn’t actually contain anything new —— every feature has been taken from some other language. These practical capabilities are wrapped up in a simple package that’s available for anyone to download and use without restriction; not even the GNU Public License applies.
Like Java, Python has a small core and a large, extensible library of functions and procedures. Thus, most of what a programmer is likely to need already exists in written, tested form and can be used with simple library calls glued together with a small amount of new code.
One measure of Python’s programmer-friendliness is its reliance on a simple indentation hierarchy for grouping sections of code, which eliminates the need to match Begin/End statements or to count parentheses, brackets or curly braces.
Even so, Python is a general-purpose programming language that offers far more structure and support for large programs than simple shell scripts and much more error checking than lower-level languages such as C.
Python is object-oriented with built-in, high-level data types, including flexible arrays and dictionaries. It can be applied to much larger problems than languages such as Awk or even Perl can, yet it remains as easy to use as those languages.
Python语言
定义:Python是一种面向对象、开放源码的编程语言,常常用于应用程序的快速开发。Python简洁的语法强调了可读性,降低了程序维护的成本,同时其巨大的函数和调用库有助于(程序的)重复使用和可扩展性。
在Web开发者和创新者(尤其是开放源码界)喜欢用的语言中,最流行的是Perl、PHP和Python三种语言。虽然提到Perl和PHP的时候更多一些,但我们不能忽视Python,它正在成为一种强有力的、能替代较传统开发语言的可选语言。
Python之所以非常吸引人,是由于它的易用性、高度的硬件抽象、广泛支持内部操作(如输入/输出、内存管理、数据录入和动态),以及也许最重要的是程序员能利用此语言提高生产率。
Python是由荷兰程序员Guido von Rossum在上世纪八十年代后期发明的,以当时的BBC电视喜剧片Monty Python’s Flying Circus命名。
你可以把Python当作一种脚本语言,或者把它看成“常规”的编程语言。它为快速开发和测试提供了一种交互模式,而为了方便重复使用又提供了非交互模式。
事实上,Python不包含任何真正新的功能,所有的功能都是从其他的语言拿来的。这些实用的功能包装在一个简单的包中,任何人都能下载此包,使用也没有限制,甚至连GNU公共许可也不需要。
Python与Java类似,只有一个很小的内核和一个很大的、可扩展的函数和子程序库。因此,程序员可能需要的大部分东西已经以书面的、业经测试的形式存在,能与简单的库调用一起使用,再加上少量的新编写的程序结合在一起。
Python实现对程序员友好的一项措施,就是依靠简单的第一行缩进去的层次排列,给程序块进行分类,这就不需要“Begin/End”语句的配对或者用方括号或圆括号的编号。
即便这样,Python仍是一种通用的编程语言,对大程序提供了比简单shell脚本更多的结构和支持,也比低级一些的语言(如C语言)提供更多的纠错能力。
Python也是拥有内在的高级数据类型的面向对象语言,其中包括灵活的阵列和字典。它能被应用于处理比Awk或Perl一类的语言能处理的更大问题,同时保持与这些语言一样的易用性。