[Python-3000] PEP 3138- String representation in Python 3000

Stephen J. Turnbull stephen at xemacs.org
Thu May 15 05:00:49 CEST 2008


Greg Ewing writes:

 > Wasn't there a big discussion once before about whether
 > encode/decode should be usable for things other than
 > unicode<->non-unicode transformations? I thought the
 > conclusion reached back then was that they shouldn't.

That group prevailed, but it was more like a WBA title bout ... here's
the rematch.  This one won't "prove" anything either.<wink>

 > Is there some reason the transformations being talked
 > about can't just be provided as functions that operate
 > on strings or bytes?

This discussion isn't about whether it could be done or not, it's
about where people expect to find such functionality.  Personally, if
I can find .encode('euc-jp') on a string object, I would expect to
find .encode('gzip') on a bytes object, too.

I think this one is just going to come down to BDFL pronouncement
about which is more Pythonic, because I don't really see either point
of view as more "natural".


More information about the Python-3000 mailing list