PYTHON
What is Python?
Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.
Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming. Python is often described as a "batteries included" language due to its comprehensive standard library. Python's design means that its standard library consists of a wide range of utilities and functions that can be used in almost any situation. The standard library also includes a substantial set of built-in data structures.
Python is object-oriented. There are a variety of object-oriented paradigms that can be used, ranging from single-instance primitive types to classes with inheritance and (in certain cases) operator overloading. In many cases, an object and its parent are considered one and the same. As an example, a class that has an instance of class Float can be created as:
class Float ( object ): def __init__ ( self , value ): self . value = value def __str__ ( self ): return "Float"
In contrast, an instance of class Point:
class Point ( object ): def __init__ ( self , x , y ): self . x = x self . y = y def __str__ ( self ): return "Point"
generally represents a single instance of a Point rather than a single instance of an object.[32] In contrast, an object may have multiple instances (including itself as an instance), and the inheritance hierarchy is inherited from parent class to child class. In Python, this inheritance can also be:
HISTORY
Python was conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a successor to ABC programming language, which was inspired by SETL, capable of exception handling and interfacing with the Amoeba operating system. Its implementation began in December 1989. Van Rossum shouldered sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from his responsibilities as Python's Benevolent Dictator For Life, a title the Python community bestowed upon him to reflect his long-term commitment as the project's chief decision-maker. He now shares his leadership as a member of a five-person steering council. In January 2019, active Python core developers elected Brett Cannon, Nick Coghlan, Barry Warsaw, Carol Willing, and Van Rossum to a five-member "Steering Council" to lead the project. Guido van Rossum has since then withdrawn his nomination for the 2020 Steering council.
Guido van Rossum (Dutch: [ˈɣido vɑn ˈrɔsʏm, -səm]; born 31 January 1956) is a Dutch programmer best known as the creator of the Python programming language, for which he was the "Benevolent dictator for life" (BDFL) until he stepped down from the position in July 2018. He remained a member of the Python Steering Council through 2019 and withdrew from nominations for the 2020 election.
Python 2.0 was released on 16 October 2000 with many major new features, including a cycle-detecting garbage collector and support for Unicode.
Python 3.0 was released on 3 December 2008. It was a major revision of the language that is not completely backwards-compatible. Many of its major features were backported to the Python 2.6.x and 2.7.x version series. Releases of Python 3 include the 2to3 utility, which automates (at least partially) the translation of Python 2 code to Python 3.
Python 2.7's end-of-life date was initially set in 2015 then postponed to 2020 out of concern that a large body of existing code could not easily be forward-ported to Python 3.No more security patches or other improvements will be released for it. With Python 2's end-of-life, only Python 3.6.x and later are supported. The 3.x series is intended to remain supported for 10 years after the 2.x series is deprecated.
Python's current stable release is Python 3.7.
Development priorities and style
Since 2000, the Python language specification has incorporated two "bedrock modules": "standard library" and "cargo".
Python's standard library includes, among other things, an object-oriented programming library, a concurrency library, an environment library, and modules for running web servers, desktop applications, games, and other software. It is one of the largest Python libraries.
The language was initially written in C. Python 2, like many other dynamic languages, was extended with a C API to allow interoperation with existing C programs, and a substantial portion of the C library is imported and used for handling C-style exceptions (i.e. the str, strtod, and strtoupper functions). Many other low-level functions were added to the library for better performance and interface with C libraries. Python 3 removes the C API to C. The C++ header files from prior Python versions have been removed from the official distribution.[59]
Python has a flexible syntax that allows a wide variety of features and functions to be expressed in a uniform and simple way. Over time, it has become more sophisticated and is becoming more like a general-purpose programming language, especially when it is combined with other programming tools such as libraries.
About the book and the Authors///
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors: Meghan Blanchette and Rachel Roumeliotis
Production
Editor: Kristen Borg
Copyeditor: Jasmine Kwityn
Proofreader: BIM Proofreading Services
Indexer: WordCo Indexing Services
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Robert Romano
May 2013: Third Edition
Revision History for the Third Edition:
2013-05-08: First release
See77 for http://oreilly.com/catalog/errata.csp?isbn=97814493403r
release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Python Cookbook, the image of a springhaas, and related trade dress are trademarks of O’Reilly
Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein
Post a Comment