running python 2 vs 3
breamoreboy at yahoo.co.uk
Thu Mar 20 21:22:33 CET 2014
On 20/03/2014 20:08, Marko Rauhamaa wrote:
> Alan Meyer <ameyer2 at yahoo.com>:
>> I presume it would still be a good idea to test both python
>> interpreters against any script that you didn't knowingly write with a
>> feature that will only work in one of the two python versions.
>> If it works fine in both - and many will, then use:
>> #!/usr/bin/env python
>> Only use the "python2" or "python3" versions if you really have a
>> reason to do so.
>> Yes? No?
> No. Even if you managed to do that, it would mean getting the worst of
> both worlds. The language dialects are too far apart. When you start
> your Python project, you decide between Python 2 and Python 3 and go all
I do not agree that the dialects are too far apart, not that it really
matters. There are several libraries available to enable code to run
under both versions. The starter is 2to3 which had been in the standard
library for what seems like an eternity to me.
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
This email is free from viruses and malware because avast! Antivirus protection is active.
More information about the Python-list