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

mithrond at gmail.com mithrond at gmail.com
Sat Oct 14 10:07:11 EDT 2006


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.




More information about the Python-list mailing list