[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Bruce Richardson
Bruce Richardson added the comment: Ah, doh. my bad. On 11 July 2018 at 16:09, Zachary Ware wrote: > > Zachary Ware added the comment: > > I don't agree with your conclusion here: importlib2 is a PyPI package that > backports Python 3's importlib to Python 2, thus the ImportError will only

[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Zachary Ware
Zachary Ware added the comment: I don't agree with your conclusion here: importlib2 is a PyPI package that backports Python 3's importlib to Python 2, thus the ImportError will only be raised on Python 2 with the example as written. -- nosy: +zach.ware __

[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Bruce Richardson
New submission from Bruce Richardson : https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection In this section, the (very good) advice is "It would be better to treat Python 2 as the exceptional case instead of Python 3 and assume that future Python v