New Book Review: "Picking a Python Version"
New book review for Picking a Python Version: A Manifesto, by David Mertz, O'Reilly, 2015, reposted here:
As someone relatively new to Python, this book perfectly matched my need to understand the currently available 2.x and 3.x series of the programming language. However, Mertz also discusses the available options to port Python code from 2.x to 3.x, some of the advantages provided by the 3.x series, the implementations of the Python interpreter that currently exist outside CPython, and Python distributions that provide more packages out-of-the-box than what the Python Software Foundation (PSF) provides.
Like some who might find this book of interest, I'm a long-time Java user who has also picked up the R programming language in recent years for data work, and who increasingly views Python as an advantage when looking to do work specific to machine learning. Initially, I saw that this book mentioned the Anaconda distribution used by a third-party product I recently began to use. But while it was good to confirm that Anaconda comes bundled with over 195 of the most popular science, math, engineering, and data analysis packages such as NumPy, SciPy, Pandas, IPython, Matplotlib, Numba, Blaze, and Bokeh, the author's statement that Anaconda is currently compatible with both Python 2.7 and Python 3.4 especially made me take notice, given that I had just read a blog post by someone who had claimed (and complained) that Anaconda can only be used with Python 2.7. (Note that the final version of Python 3.5.0 was released in September 2015, about 5 months after the publication of this book.)
And Mertz provides a great overview of what to consider when deciding whether to use the 2.x or 3.x series, commenting that not only will the 2.x series not continue past Python 2.7.x, but that it's end-of-life is scheduled for the not-too-distant future (2020). One related area of discussion that readers might find of interest is the discussion of the usage rates of both series, and why these rates are so difficult to measure. Additionally, the author discusses methods to perform a one-time porting of code from 2.x code to 3.x, as well as the implications in creating a version-neutral codebase that will run using either of these series.
In the second half of the text, the author discusses a subjective list of advantages to using the 3.x series, as well as implementations of the Python interpreter that currently exist outside CPython, the C language implementation of the Python language. Of particular interest for my own work, Jython is an implementation of the Python language designed to run on the Java platform. However, Mertz explains that while Jython is compatible with CPython when using pure Python modules or standard library modules, Jython by its very nature cannot access C language extension modules written for use with CPython. Additionally, Jython only supports the 2.x series of Python, and based on the GitHub project, a new version of Jython has not been released since around the time this book was released (April 2015), even though project contributors appear to be working toward a Python 3.5.0 compatible version.