[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'
report at bugs.python.org
Thu Aug 18 19:58:26 CEST 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
> > It means someone upgrading from 2.6 to 2.7 will see sys.platform change
> > from "linux3" to "linux2". That breaks compatibility.
> No, it doesn't. Code that works on 2.6 and Linux 3 will likely support
> both linux2 and linux3, so it will continue just fine on 2.7.
Then, let's just advise that all code follow the same path and use
sys.platform.startswith() (which is really not a difficult change to
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list