History of Python

From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search
File:PythonProgLogo.png
Python logo, 1990s–2005.

The history of the Python programming language dates back to the late 1980s.

Python was conceived in the late 1980s[1] and its implementation was started in December 1989[2] by Guido van Rossum at CWI in the Netherlands as a successor to the ABC programming language capable of exception handling and interfacing with the Amoeba operating system.[3] Van Rossum is Python's principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for Life (BDFL).

Python 2.0 was released on 16 October 2000, with many major new features including a full garbage collector and support for unicode. However, the most important change was to the development process itself, with a shift to a more transparent and community-backed process.[4] Python 3.0, a major, backwards-incompatible release, was released on 3 December 2008[5] after a long period of testing. Many of its major features have also been backported to the backwards-compatible Python 2.6.[6]

Contents

First publication

In 1991, Van Rossum published the code (labeled version 0.9.0) to alt.sources.[7] Already present at this stage in development were classes with inheritance, exception handling, functions, and the core datatypes of list, dict, str and so on. Also in this initial release was a module system borrowed from Modula-3; Van Rossum describes the module as "one of Python's major programming units".[1] Python's exception model also resembles Modula-3's, with the addition of an else clause.[3] In 1994 comp.lang.python, the primary discussion forum for Python, was formed, marking a milestone in the growth of Python's userbase.[1]

Version 1.0

Python reached version 1.0 in January 1994. The major new features included in this release were the functional programming tools lambda, map, filter and reduce. Van Rossum stated that “Python acquired lambda, reduce(), filter() and map(), courtesy of (I believe) a Lisp hacker who missed them and submitted working patches.”[8]

The last version released while van Rossum was at CWI was Python 1.2. In 1995, Van Rossum continued his work on Python at the Corporation for National Research Initiatives (CNRI) in Reston, Virginia whence he released several versions.

By version 1.4, Python had acquired several new features. Notable among these are the Modula-3 inspired keyword arguments (which are also similar to Common Lisp's keyword arguments), and built-in support for complex numbers. Also included is a basic form of data hiding by name mangling, though this is easily bypassed.[9]

During Van Rossum's stay at CNRI, he launched the Computer Programming for Everybody (CP4E) initiative, intending to make programming more accessible to more people, with a basic 'literacy' in programming languages, similar to the basic English literacy and mathematics skills required by most employers. Python served a central role in this: because of its focus on clean syntax, it was already suitable, and CP4E's goals bore similarities to its predecessor, ABC. The project was funded by DARPA.[10] As of 2007, the CP4E project is inactive, and while Python attempts to be easily learnable and not too arcane in its syntax and semantics, reaching out to non-programmers is not an active concern.[11]

BeOpen

In 2000, the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. CNRI requested that a version 1.6 be released, summarizing Python's development up to the point at which the development team left CNRI. Consequently, the release schedules for 1.6 and 2.0 had a significant amount of overlap.[4] Python 2.0 was the only release from BeOpen.com. After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined Digital Creations.

The Python 1.6 release included a new CNRI license that was substantially longer than the CWI license that had been used for earlier releases. The new license included a clause stating that the license was governed by the laws of the State of Virginia. The Free Software Foundation argued that the choice-of-law clause was incompatible with the GNU GPL. BeOpen, CNRI, and the FSF negotiated a change to Python's free software license that would make it GPL-compatible. Python 1.6.1 is essentially the same as Python 1.6, with a few minor bug fixes, and with the new GPL-compatible license.[12]

Version 2.0

Python 2.0 introduced list comprehensions, a feature borrowed from the functional programming languages SETL and Haskell. Python's syntax for this construct is very similar to Haskell's, apart from Haskell's preference for punctuation characters and Python's preference for alphabetic keywords. Python 2.0 also introduced a garbage collection system capable of collecting reference cycles.[4]

Python 2.1 was close to Python 1.6.1, as well as Python 2.0. Its license was renamed Python Software Foundation License. All code, documentation and specifications added, from the time of Python 2.1's alpha release on, is owned by the Python Software Foundation (PSF), a non-profit organization formed in 2001, modeled after the Apache Software Foundation.[12] The release included a change to the language specification to support nested scopes, like other statically scoped languages.[13] (The feature was turned off by default, and not required, until Python 2.2.)

A major innovation in Python 2.2 was the unification of Python's types (types written in C), and classes (types written in Python) into one hierarchy. This single unification made Python's object model purely and consistently object oriented.[14] Also added were generators which were inspired by Icon.[15]

Version 3.0

Python 3.0 (also called "Python 3000" or "Py3K") was designed to break backwards compatibility with the 2.x series in order to repair perceived flaws in the language. The guiding principle was to "reduce feature duplication by removing old ways of doing things".

Philosophy

Python 3.0 was developed with the same philosophy as in prior versions. However, as Python had accumulated new and redundant ways to program the same task, Python 3.0 had an emphasis on removing duplicative constructs and modules, in keeping with "There should be one— and preferably only one —obvious way to do it."

Nonetheless, Python 3.0 remained a multi-paradigm language. Coders still had options among object orientation, structured programming, functional programming and other paradigms, but within such broad choices, the details were intended to be more obvious in Python 3.0 than they were in Python 2.x.

Timeline and compatibility

Python 3.0 was released on December 3, 2008.[5] The Python 2.x and Python 3.x series are planned to coexist for several releases in parallel, where the 2.x series exists largely for compatibility and with some new features being backported from the 3.x series.[6]

Python 3.0 broke backward compatibility. There was no requirement that Python 2.x code would run unmodified on Python 3.0. There were basic changes such as changing the print statement into a print function (so any use of print as a statement will cause the program to fail), and switching to Unicode for all text strings. Python's dynamic typing combined with the plans to change the semantics of certain methods of dictionaries, for example, made perfect mechanical translation from Python 2.x to Python 3.0 very difficult. However, a tool called "2to3" could do most of the job of translation, pointing out areas of uncertainty using comments or warnings. Even in an alpha stage, 2to3 appeared to be fairly successful at performing the translation.[16] The Python development team recommends keeping one source (for the 2.x series), and producing releases for the Python 3.x platform using 2to3. The resulting code should not be edited until the program no longer needs to run on Python 2.x.[6]

Python 2.6 includes forward compatibility features, as well as a "warnings" mode that will warn of potential transition problems. Warnings will be reported for builtins which no longer exist in 3.0, as well as various old Python 2.x features that Python 3.0 removed (see PEP 361 for more information).

Features

Some of the major changes scheduled for Python 3.0 were:

  • Changing print so that it is a built-in function, not a statement. This made it easier to change a module to use a different print function, as well as making the syntax more regular. In Python 2.6 this could be enabled by entering from __future__ import print_function.[17]
  • Moving reduce (but not map or filter) out of the built-in namespace and into functools (the rationale being that operations using reduce are expressed more clearly using an accumulation loop);[18]
  • Adding support for optional function annotations that can be used for informal type declarations or other purposes;[19]
  • Unifying the str/unicode types, representing text, and introducing a separate immutable bytes type; and a mostly corresponding mutable bytearray type, both of which represent arrays of bytes;[20]
  • Removing backward-compatibility features, including old-style classes, integer-truncating division, string exceptions, and implicit relative imports.

Influences from other languages

Python's core syntax and certain aspects of its philosophy are directly inherited from ABC. C provided some of Python's syntax, and the Bourne shell served as the model for an interpreter that becomes interactive when run without arguments.[21] List comprehensions, anonymous functions, lexical closures and the map function are among the major features borrowed from functional languages, primarily dialects of Lisp and Haskell.[8][4][13] Generators and iterators were inspired by Icon, and were then fused with the functional programming ideas borrowed into a unified model.[15] Modula-3 was the basis of the exception model and module system.[1][3] Perl lent Python regular expressions, used for string manipulation.[22] Python's standard library additions and syntactical choices were strongly influenced by Java in some cases: the logging package,[23] introduced in version 2.3,[24] the SAX parser, introduced in 2.0, and the decorator syntax that uses @,[25] added in version 2.4[26]

See also

References

  1. 1.0 1.1 1.2 1.3 "The Making of Python". Artima Developer. http://www.artima.com/intv/pythonP.html. Retrieved 2007-03-22. 
  2. "A Brief Timeline of Python". Guido van Rossum. http://python-history.blogspot.com/2009/01/brief-timeline-of-python.html. Retrieved 2009-01-20. 
  3. 3.0 3.1 3.2 "Why was Python created in the first place?". Python FAQ. http://www.python.org/doc/faq/general/#why-was-python-created-in-the-first-place. Retrieved 2007-03-22. 
  4. 4.0 4.1 4.2 4.3 A.M. Kuchling and Moshe Zadka. "What's New in Python 2.0". http://www.amk.ca/python/2.0/. Retrieved 2007-03-22. 
  5. 5.0 5.1 Python 3.0 release
  6. 6.0 6.1 6.2 PEP 3000
  7. "HISTORY". Python source distribution. Python Foundation. http://svn.python.org/view/*checkout*/python/trunk/Misc/HISTORY. Retrieved 2007-03-21. 
  8. 8.0 8.1 Guido van Rossum. "The fate of reduce() in Python 3000". Artima Developer. http://www.artima.com/weblogs/viewpost.jsp?thread=98196. Retrieved 2007-03-22. 
  9. "LJ #37: Python 1.4 Update". http://www.amk.ca/python/writing/12-14. Retrieved 2007-04-29. 
  10. Guido van Rossum. "Computer Programming for Everybody". http://www.python.org/doc/essays/cp4e.html. Retrieved 2007-03-22. 
  11. "Computer Programming for Everybody". Python Software Foundation. http://www.python.org/cp4e/. Retrieved 2007-03-22. 
  12. 12.0 12.1 "History of the software". Python Library Reference. http://www.python.org/doc/2.5/lib/node951.html. Retrieved 2007-03-22. 
  13. 13.0 13.1 Jeremy Hylton. "Statically Nested Scopes". http://www.python.org/dev/peps/pep-0227/. Retrieved 2007-03-22. 
  14. A.M. Kuchling (2001-12-21). "PEPs 252 and 253: Type and Class Changes". What's New in Python 2.2. Python Foundation. http://www.python.org/doc/2.2.3/whatsnew/sect-rellinks.html. Retrieved 2008-09-05. 
  15. 15.0 15.1 A.M. Kuchling (2001-12-21). "PEP 255: Simple Generators". What's New in Python 2.2. Python Foundation. http://www.python.org/doc/2.2.3/whatsnew/node5.html. Retrieved 2008-09-05. 
  16. Sam Ruby, 2to3, September 1, 2007
  17. PEP 3105
  18. Thread on Artima programmer blog
  19. PEP 3197
  20. PEP 3137: Immutable Bytes and Mutable Buffer
  21. "Interview with Guido van Rossum". July 1998. http://www.amk.ca/python/writing/gvr-interview. Retrieved 29 2007. 
  22. http://docs.python.org/library/re.html
  23. "PEP 282 - A Logging System". Python.org. http://www.python.org/dev/peps/pep-0282/. Retrieved 2008-11-24. 
  24. "8 PEP 282: The logging Package". Python.org. http://www.python.org/doc/2.3/whatsnew/node9.html. Retrieved 2008-11-24. 
  25. "PEP 318 - Decorators for Functions and Methods". Python.org. http://www.python.org/dev/peps/pep-0318/. Retrieved 2008-11-24. 
  26. "5 PEP 318: Decorators for Functions and Methods". Python.org. http://www.python.org/doc/2.4/whatsnew/node6.html. Retrieved 2008-11-24. 

External links

Personal tools

Served in 0.730 secs.