[New-bugs-announce] [issue5425] 2to3 wrong for types.StringTypes

Hagen Fürstenau report at bugs.python.org
Thu Mar 5 15:48:51 CET 2009

New submission from Hagen Fürstenau <hfuerstenau at gmx.net>:

In Python 2.6 we have

>>> types.StringTypes
(<type 'str'>, <type 'unicode'>)

but 2to3 translates "types.StringTypes" into "str", which is obviously
wrong. The attached patch changes it into "(str, bytes)".

components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3_StringTypes.patch
keywords: patch
messages: 83198
nosy: hagen
severity: normal
status: open
title: 2to3 wrong for types.StringTypes
type: behavior
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file13248/2to3_StringTypes.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list