Python 3.x adoption

Terry Reedy tjreedy at udel.edu
Fri Jan 17 18:03:45 EST 2014


On 1/17/2014 5:16 PM, beliavsky at aol.com wrote:

> I don't think the Fortran analogy is valid.

The appropriate analogy for the changes between Python 2.x and 3.x, 
which started about 1 and 2 decades after the original Python, are the 
changes between Fortran IV/66 and Fortran 77, also about 1 and 2 decades 
after the original Fortran. The latter two have a comparable number of 
differences. "In this revision of the standard [F77], a number of 
features were removed or altered in a manner that might invalidate 
previously standard-conforming programs.
   https://en.wikipedia.org/wiki/Fortran
Not mentioned in the wiki article is the change in calling convention 
from call by value to call by reference (or maybe the opposite). I 
remember a program crashing because of this when I tried it with F77.

Overall, there was more churn in Fortran up to F77 than there was in 
Python up to 3.0.

> The Fortran standards after F77 are almost complete supersets of F77, and Fortran compiler vendors handle even the deleted parts of F77, knowing their customer base. Therefore you do not need to rewrite old Fortran code to use it with Fortran 95 or 2003 compilers, and you can easily mix old-style and modern Fortran. Later Fortran standards did not invalidate basic syntax such as print statements, as Python 3 did. Python 2 and 3 are incompatible in ways that do not apply to Fortran standards pre- and post- F77.

Since 3.0, we have added new syntax ('yield from', u'' for instance) but 
I do not believe we have deleted or changed any syntax (I might have 
forgotten something minor) and I do not know of any proposal to do so 
(except to re-delete u'', which should only be used as a temporary 
crutch for 2&3 code).

 > Python 2 and 3 are incompatible in ways that do not apply to Fortran 
 > standards pre- and post- F77.

As stated above, I disagree with respect to pre-F77 and F77. Did you 
actually program in both, as I did?

-- 
Terry Jan Reedy




More information about the Python-list mailing list