[issue2630] repr() should not escape non-ASCII characters

Marc-Andre Lemburg report at bugs.python.org
Fri Apr 18 10:46:12 CEST 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 2008-04-18 05:35, atsuo ishimoto wrote:
> atsuo ishimoto <ishimoto at users.sourceforge.net> added the comment:
> 
> Is a codec which encode() returns an Unicode allowed in Python3?

Sure, why not ?

I think you have to ask another question: Is repr() allowed to
return a string (instead of Unicode) in Py3k ?

If not, then unicode_repr() will have to check the return value of
the codec and convert it back to Unicode as necessary.

> I started to think codec is not nessesary, but python function is enough.

That's what we currently have with unicode_repr(), but it doesn't
solve the problem.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2630>
__________________________________


More information about the Python-bugs-list mailing list