3 ms·
Ok, so you're talking about simple scripts that are contained in a single file, in that case it's possible to simply write a script that works on all versions.
by takeda 10y ago
Ok, so you're talking about simple scripts that are contained in a single file, in that case it's possible to simply write a script that works on all versions. I wrote many scripts like this (ok, not all versions but 2.6-3.6), it's really on the developer.
I mean even within a single major version there are changes that are incompatible. For example 2.6 doesn't have OrderedDict, doesn't have set comprehension. 3.3 doesn't have asyncio, 3.4 doesn't have async/await, 3.5 doesn't have types annotation for variables etc.
So having python2/python3 doesn't really benefit much especially that at this point everyone is moving away from 2.7.
Edit: virtualenv is builtin in python since 3.4.