[Tutor] A slight bug in IDLE

eryksun eryksun at gmail.com
Sat Jul 13 14:47:44 CEST 2013


On Sat, Jul 13, 2013 at 6:11 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> By the way, you can import __future__, but when you do, it is just an
> ordinary module with no superpowers. Only the "from __future__ import ..."
> in the first or second line of code has superpowers. Try this:
>
> import __future__
> dir(__future__)

I thought this was clear in my description:

    >>> __future__.CO_FUTURE_DIVISION  # flag
    8192
    >>> __future__.division
    _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)

Note to self: next time show "import __future__".


More information about the Tutor mailing list