'from __future__ import ...' overview

Discussion in 'Python' started by Logan, Nov 25, 2003.

  1. Logan

    Logan Guest

    Is there a list with all 'from __future__ import ...' statements
    (which lists all the statements, in which version of Python the
    feature was introduced and in which version of Python it will become
    the default behavior)?

    I guess, normally such a list is not necessary because a new feature
    needs its 'from __future__ import ...' statement only in the present
    version of Python and will become default in the next version. But
    e.g. 'from __future__ import division' is said to not become default
    before Python 3.0.

    Usually, I use A.M. Kuchling's "What's new in Python 2.x" articles
    for that kind of stuff; but I thought, such a might exist somewhere
    as a short reference.

    Any links?

    --
    mailto: logan@phreaker(NoSpam).net
     
    Logan, Nov 25, 2003
    #1
    1. Advertising

  2. Logan

    Serge Orlov Guest

    "Logan" <> wrote in message news:p...
    > Is there a list with all 'from __future__ import ...' statements
    > (which lists all the statements, in which version of Python the
    > feature was introduced and in which version of Python it will become
    > the default behavior)?

    import __future__
    print __future__.all_feature_names
    print __future__.division

    -- Serge
     
    Serge Orlov, Nov 25, 2003
    #2
    1. Advertising

  3. On Tue, Nov 25, 2003 at 01:09:09AM +0100, Logan wrote:
    > Is there a list with all 'from __future__ import ...' statements
    > (which lists all the statements, in which version of Python the
    > feature was introduced and in which version of Python it will become
    > the default behavior)?


    Yes -- __future__.py in the python standard library.

    -Andrew.
     
    Andrew Bennetts, Nov 25, 2003
    #3
  4. Logan <> writes:

    > Is there a list with all 'from __future__ import ...' statements
    > (which lists all the statements, in which version of Python the
    > feature was introduced and in which version of Python it will become
    > the default behavior)?


    Yes: in __future__.py :)

    Cheers,
    mwh

    --
    Lisp does badly because we refuse to lie. When people ask us if
    we can solve insoluble problems we say that we can't, and because
    they expect us to lie to them, they find some other language
    where the truth is less respected. -- Tim Bradshaw, comp.lang.lisp
     
    Michael Hudson, Nov 25, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacek Generowicz

    from __future__ import decorators

    Jacek Generowicz, Jan 13, 2005, in forum: Python
    Replies:
    8
    Views:
    380
    Jacek Generowicz
    Jan 17, 2005
  2. Replies:
    2
    Views:
    315
  3. Ron Adam
    Replies:
    7
    Views:
    510
    Ron Adam
    Feb 9, 2007
  4. Replies:
    8
    Views:
    709
    Roy Smith
    Apr 20, 2008
  5. Malcolm Greene
    Replies:
    1
    Views:
    380
    Dan Bishop
    Apr 12, 2008
Loading...

Share This Page