[Python-ideas] add a single __future__ for py3?

Nick Coghlan ncoghlan at gmail.com
Mon Sep 21 11:29:24 CEST 2015

On 20 September 2015 at 03:50, Chris Barker <chris.barker at noaa.gov> wrote:
> Hi all,
> the common advise, these days, if you want to write py2/3 compatible code,
> is to do:
> from __future__ import absolute_import
> from __future__ import division
> from __future__ import print_function
> from __future__ import unicode_literals
> https://docs.python.org/2/howto/pyporting.html#prevent-compatibility-regressions
> I'm trying to do this in my code, and teaching my students to do it to.
> but that's actually a lot of code to write.

For folks using IPython Notebook, I've been suggesting to various
folks that a "Python 2/3 compatible" kernel that enables these
features by default may be desirable. Ed Schofield of
python-future.org was the last person I suggested that to, and he was
interested in taking a look at the idea, but wasn't sure when he'd be
able to find the time.

So, if anyone's interested in exploring the creation of new Project
Jupyter kernels... :)


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list