1 Sep
2005
1 Sep
'05
5:32 a.m.
Oren Tirosh wrote:
Writing programs that run on both 2.x and 3 may require ugly version-dependent tricks like:
try: compile except NameError: from sys import compile
Just had a weird thought. What if you could write from sys or __builtin__ import compile which would be equivalent to try: from sys import compile except ImportError: from __builtin__ import compile Greg