• Complain

David Mertz - Picking a Python Version: A Manifesto

Here you can read online David Mertz - Picking a Python Version: A Manifesto full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2015, publisher: OReilly Media, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

David Mertz Picking a Python Version: A Manifesto
  • Book:
    Picking a Python Version: A Manifesto
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2015
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Picking a Python Version: A Manifesto: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Picking a Python Version: A Manifesto" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

This report guides you through the implicit decision tree of choosing what Python version, implementation, and distribution is best suited for you. It weighs and discusses the merits of each of these choices, and briefly discusses the reasons each option exists.

David Mertz: author's other books


Who wrote Picking a Python Version: A Manifesto? Find out the surname, the name of the author of the book and a list of all author's works by series.

Picking a Python Version: A Manifesto — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Picking a Python Version: A Manifesto" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Picking a Python Version: A Manifesto

by David Mertz

Copyright 2015 OReilly Media, Inc. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Editor: Meghan Blanchette
  • Production Editor: Kristen Brown
  • Copyeditor: Gillian McGarvey
  • Interior Designer: David Futato
  • Cover Designer: Karen Montgomery
  • Illustrator: Rebecca Demarest
  • April 2015: First Edition
Revision History for the First Edition
  • 2015-03-12: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781491926970 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. Picking a Python Version: A Manifesto, the cover image, and related trade dress are trademarks of OReilly Media, Inc.

While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

978-1-491-92697-0

[LSI]

Chapter 1. Python Versions

There are two major versions of the Python programming language: thePython 2.x series, and the newer Python 3.x series. The Python 3.x seriesstarted with the release of Python 3.0 in December 2008; since thattime, Python 2.7 was released and has continued to receive point versionreleases, with Python 2.7.9 being the latest version as of this writing.As a footnote, there was, naturally, a Python 1.x series that washighly successful in the 1990s, but that series has long beenout-of-maintenance.

In his 2014 PyCon keynote (), Guido van Rossum, Pythons Benevolent Dictator for Life (sometimes affectionately called the BDFL or GvR) made it clear that the Python 2.x series will not continue past Python 2.7.x. The end-of-life for Python 2.7.x is 2020, and no new features will be added to the 2.x series of Python.

Within a series, Python places an especially strong philosophicalemphasis on backward compatibility (in comparison to many otherprogramming languages). It is extremely rare for a series to breakthis backward compatibility in later minor versions; in the few caseswhere it has occurred, it is only to address large previouslyundiscovered bugs or security issues, and even then great attention ispaid to affecting as little running code as possible. That said, newPython versions inevitably add important features, either in thelanguage itself, its built-in functions, or in standard library supportmodules.

Figure 1-1 Guido van Rossums PyCon 2014 keynote address photo credit David - photo 1
Figure 1-1. Guido van Rossums PyCon 2014 keynote address (photo credit: David Lesieur 2014, CC-BY-SA)

Python developers have numerous versions and implementations to choosefrom. Many of us still use Python 2.x and CPythonand that is still often agood choicebut there are many situations in which making adifferent choice makes sense.

Python 3.x, and in particular the Python 3.5 version coming out soon, offernumerous advantages over the Python 2.x series. New development should typicallybe done using Python 3.x, and although the 2020 end-of-life for Python 2.x isnt allthat close, it is good for companies and projects to start think ofporting plans for existing code.

The (Small) Break

With the introduction of the so-called Python 3000 version, which wasreleased after long deliberation as Python 3.0 and subsequent Python 3.xversions, the designers deliberately allowed small languageincompatibilities to be introduced in the new language series. A fulldiscussion of this is contained in a Python Enhancement Proposal: Python 3.x aims to improve afamiliar Python 2.x language rather than to create a new orfundamentally different language.

While there is a significant subset of Python code that is able to beversion-neutral out of the box, most existing codebases requirea small degree of rewriting and/or use of compatibility tools andlibraries to move from Python 2.x to Python 3.x. Real-world code usingthe most natural idioms in Python 2.x usually does various things thatare not quite compatible with Python 3.x, and the code that is version-neutral must be written in a careful way to achieve that. That is tosay, if you wrote some module or script 10 years ago, it is quiteunlikely is will just run in Python 3.x with no changes.

Moving Forward

The bottom line is that Python 3.x is a better language than Python2.x, albeit in a large collection of relatively small ways. But as withany transitionespecially one that introduces genuine backwardincompatibilitiesit takes time to move users to thelatest version. To a lesser extent, this is true even within a series:there were (are) certainly some few long-running and stable programsthat ran (probably still run) on Python 2.1or even on Python1.5.2where simply keeping the platform consistent was easier thantesting a transition. If it aint broke, dont fix it!

However, going forward, new projects should be written for Python 3.x,and actively maintained old projects should transition betweenversions or plan on doing so at the earliest opportunity. Still,even after the 2020 end-of-life, executables already running will notsuddenly stop doing so (albeit, changes in underlying operatings systemsor in supporting hardware might require new versions, but much thesame upgrade issue exists for OSes as for programming languages, andletting old systems just run is the same option in both cases).

One issue to consider when moving to the latest version of Python is simply whatversion of the language comes preinstalled with your operating system,if any. Microsoft Windows does not ship with any real built-in developertools or languages. Of course, Pythonsin various versions anddistributionsare free to download from python.org and other sites (asare many other programming languages and developer tools). Apple OS Xships with Python 2.x preinstalled (in all recent versions; theirfuture plans are confidential and presumably strategic), so while freelyavailable, installing Python 3.x takes at least some extra effort.Linux distributions have traditionally shipped with Python 2.xinstalled, but increasingly the latest versions of these distros usePython 3.x for all of their internal tooling, ship with Python 3.x ontheir default media (either exclusively or with both Python 3.x andPython 2.x included), and generally encourage the use of Python 3.x. Ofcourse, for many reasons similar to those discussed above, upgradingexisting hardware systems from older operating systems is itself aneffort, and poses risks of breaking existing programs and workflows.

Unix-Like Systems

PEP 394, entitled Thepython Command on Unix-Like Systems, specifies the recommendedconfiguration of Python on Unix-like systems. This includes Linuxdistros, of course. It equally applies to BSD-family Unix systems, suchas FreeBSD, OpenBSD, NetBSD, and even to Apple OS X. Of course, whilethe Python Software Foundation can make a recommendation via a PEP, noother entity is bound to follow such recommendations (some do, somedont). The basic purpose of this recommendation is to govern thebehavior of files that use the shebang conventionthat is, files that lookat the first few bytes of a file to see if they are an executable scriptby seeing if they look like:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Picking a Python Version: A Manifesto»

Look at similar books to Picking a Python Version: A Manifesto. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Picking a Python Version: A Manifesto»

Discussion, reviews of the book Picking a Python Version: A Manifesto and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.