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

"Martin v. Löwis" martin at v.loewis.de
Sat Jun 19 12:22:38 EDT 2004


Jeremy Hylton wrote:
> Who cares about the type inference <0.2 wink>.  It's harder for the
> reader of the program to understand if encode() returns a different
> type.  Would there be some common property that all encode() return
> values would share?  Can't think of one myself.

No. In addition, the stream codec classes become meaningless 
(StreamReader, StreamWriter), as they are supposed to return
a concatenation of encoding results - however, there is no
guarantee that the encoding results even can be concatenated.

Regards,
Martin




More information about the Python-Dev mailing list