Moving to Python 3
Posted Feb 10, 2011 10:01 UTC (Thu) by
talex (subscriber, #19139)
Parent article:
Moving to Python 3
The new unicode handling looks good, but of course we have to wait a few years for the older distributions to include it. The main problem with Python 3 is that one distribution has decided that "python" is now "python3", breaking all existing scripts. Meanwhile, other distributions provide only "python" and not "python2". As far as I can see, every Python program that wants to support all distributions must now start with:
#!/usr/bin/env python
import sys
if sys.version_info[0] > 2:
import os
os.execvp("python2", ["python2"] + sys.argv)
# ... chain-load Python 2 code without using syntax that Python 3 will choke on
This is pretty horrible.
(
Log in to post comments)