[New-bugs-announce] [issue3198] strings don't seem to roundtrip with repr()

Mark Summerfield report at bugs.python.org
Wed Jun 25 15:33:51 CEST 2008


New submission from Mark Summerfield <mark at qtrac.eu>:

With 2.5.2 and 30b1 strings don't round trip like numbers do.

I guess it has been like this a long time so isn't a bug, but it does
seem inconsistent.

Both 2.5.2 and 30b1:

>>> x = 5
>>> x == int(repr(x))
True
>>> x = "Test Text"
>>> x == str(repr(x))
False

The reason is that an extra set of enclosing quotes are added.

----------
components: Interpreter Core
messages: 68728
nosy: mark
severity: normal
status: open
title: strings don't seem to roundtrip with repr()
type: behavior
versions: Python 2.5, Python 3.0

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


More information about the New-bugs-announce mailing list