[issue21237] Update Python 2/3 porting HOWTO's suggestion for dealing with map()

Josh Rosenberg report at bugs.python.org
Wed Apr 16 13:17:04 CEST 2014


Josh Rosenberg added the comment:

I think the suggestion is intended for "how do I keep Python 2 semantics in Python 3?", not "how can I write my Python 2 code so it will run equivalently in Python 3?"

It wouldn't be a bad idea to point out that you can adopt Py3 semantics initially so as to avoid surprises later on; sadly, unlike a __future__ import, if you want cross compatible code you have to do stupid stuff like:

try:
    from future_builtins import *
except ImportError:
    # Py3 is already the future
    pass

----------
nosy: +josh.rosenberg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21237>
_______________________________________


More information about the Python-bugs-list mailing list