摘要:PythonDefinition:Pythonisanobject-oriented,open-sourceprogramminglanguageoftenusedforrapidapplicationdevelopment.Python’ssimplesyntaxemphasizesreadability,reducingthecostofprogrammaintenance,whileitslargelibraryoffunctionsandcallsencouragesreuseandextensibility.
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一類的語言能處理的更大問題,同時保持與這些語言一樣的易用性。
軟考備考資料免費領取
去領取