
5 Nov
2012
5 Nov
'12
7:55 a.m.
Am 04.11.2012 22:49, schrieb anatoly techtonik:
if sys.py3k: # some py2k specific code pass
Why?
- readable
- traceable
Explained:
- self-explanatory
- sys.version_info >= (3, 0) or sys.version[0] == '3' is harder to
trace when you need to find all python 3 related hacks
This proposal is roughly 3 minor versions late. I can offer you a sys.py3_4 attribute though... ;)
Georg