Message 118411 - Python tracker
It would be nice with some official way to tell 2to3, "Leave
this code chunk alone. This is 2.* code, that is 3.* code":
try: # Python 2.6
from urlparse import urlparse, urlunparse
except ImportError: # Python 3
from urllib.parse import urlparse, urlunparse
Could 2to3 without -p notice more cases of print(single argument),
to avoid slapping another () around them? For example:
print(2*3)
print(", ".join(dir))