a odd thing of "from __future__ import ..."

Discussion in 'Python' started by mithrond@gmail.com, Oct 14, 2006.

  1. Guest

    i can't use "from __future__ import ..." statement import two
    statesments in the same time.
    for the simple code:
    from __future__ import with_statement, division
    with file('url.txt','r') as f:
    for line in f:
    print line

    it can't run until i change the first sentence to below
    from __future__ import with_statement
    from __future__ import division

    why? python2.5/windows.
     
    , Oct 14, 2006
    #1
    1. Advertising

  2. Peter Otten Guest

    Peter Otten, Oct 14, 2006
    #2
    1. Advertising

  3. Guest

    , Oct 15, 2006
    #3
    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. Logan
    Replies:
    3
    Views:
    771
    Michael Hudson
    Nov 25, 2003
  2. Jacek Generowicz

    from __future__ import decorators

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

Share This Page