[Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?]
"Martin v. Löwis"
martin at v.loewis.de
Fri Feb 17 00:33:49 CET 2006
Josiah Carlson wrote:
> I would agree that zip is questionable, but 'uu', 'rot13', perhaps 'hex',
> and likely a few others that the two of you may be arguing against
> should stay as encodings, because strictly speaking, they are defined as
> encodings of data. They may not be encodings of _unicode_ data, but
> that doesn't mean that they aren't useful encodings for other kinds of
> data, some text, some binary, ...
To support them, the bytes type would have to gain a .encode method,
and I'm -1 on supporting bytes.encode, or string.decode.
Why is
s.encode("uu")
any better than
binascii.b2a_uu(s)
Regards,
Martin
More information about the Python-Dev
mailing list