Message79568
The fragment
try:
import cStringIO as StringIO
except ImportError:
import StringIO
s=StringIO.StringIO()
gets rewritten to
try:
import io as StringIO
except ImportError:
import io
s=io.StringIO()
Unfortunately, that code fails to work: the first import succeeds,
actually binding StringIO; the name io is unbound and gives NameError.
Apparently, the fixer choses to replace all occurrences of StringIO with
io; it should extend this replacement to "as" clauses.
My work-around is to import as _StringIO in both cases, and then refer
to the module as _StringIO. |
|
Date |
User |
Action |
Args |
2009-01-10 19:32:33 | loewis | set | recipients:
+ loewis |
2009-01-10 19:32:33 | loewis | set | messageid: <1231615953.75.0.823644333839.issue4909@psf.upfronthosting.co.za> |
2009-01-10 19:32:32 | loewis | link | issue4909 messages |
2009-01-10 19:32:32 | loewis | create | |
|