[issue5425] 2to3 wrong for types.StringTypes

Daniel Diniz report at bugs.python.org
Sat Mar 7 20:39:49 CET 2009


Daniel Diniz <ajaksu at gmail.com> added the comment:

I think Hagen's initial analysis makes more sense: the translation is
currently guessing that the user meant the more restrict (text) alternative.

IMHO it doesn't make much sense to have this:
>>> strings = (types.StringType, types.UnicodeType)
>>> strings == types.StringTypes
True

Translated to this:
strings = (bytes, str)
strings == str

----------
nosy: +ajaksu2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5425>
_______________________________________


More information about the Python-bugs-list mailing list