[Python-Dev] Adding .decode() method to Unicode
Barry A. Warsaw
Tue, 12 Jun 2001 14:35:10 -0400
>>>>> "MvL" == Martin v Loewis <firstname.lastname@example.org> writes:
MvL> What is the type of parts here? If it is a plain string,
MvL> it is already possible:
But only in Python 2.2a0 currently, right? And yes, the type is plain
MvL> I doubt you'd ever have a Unicode string that represents a
MvL> base64-encoded byte string, and if you had, .decode would
MvL> probably do the wrong thing:
>> import codecs enc,dec,_,_ = codecs.lookup("base64")
MvL> ('Hello', 9)
MvL> Note that this returns a byte string, not a Unicode string.
I trust you on that. ;) I've only played with this tangentially since
this thread cropped up.