[Python-Dev] Allowing u.encode() to return non-strings

Guido van Rossum guido at python.org
Sat Jun 19 11:29:48 EDT 2004

> Ok, how about a compromise: .encode() and .decode() of string
> and unicode objects may return string or unicode objects only
> (limiting the set of types to two base types).

This works for me, especially since I expect type inferencers to
collapse the two types (just as they should collapse int and long).

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list