Message111788
I guess it's the problem with lib2to3/fixes/fix_urllib.py. Indentation is not taken into consideration when fix "import". Fix it with indentation taken into consideration maybe a little complex, but here is a simple and ugly fix: when one import statement was transformed to two or more statement, use semicolon(';') instead of '\n' as separator, between many import statements. In this case, the
"""
def fun():
from urllib import urlopen, urlencode
"""
is transformed in to:
"""
def fun():
from urllib.request import urlopen;from urllib.parse import urlencode
"""
It will takes time to work out a better fix. |
|
Date |
User |
Action |
Args |
2010-07-28 11:14:26 | ysj.ray | set | recipients:
+ ysj.ray, benjamin.peterson, eric.araujo, dmalcolm |
2010-07-28 11:14:25 | ysj.ray | set | messageid: <1280315665.86.0.597776535006.issue9386@psf.upfronthosting.co.za> |
2010-07-28 11:14:23 | ysj.ray | link | issue9386 messages |
2010-07-28 11:14:23 | ysj.ray | create | |
|