[Python-Dev] bytes.from_hex()

Barry Warsaw barry at python.org
Tue Feb 21 13:55:31 CET 2006


On Sun, 2006-02-19 at 23:30 +0900, Stephen J. Turnbull wrote:
> >>>>> "M" == "M.-A. Lemburg" <mal at egenix.com> writes:

>     M> * for Unicode codecs the original form is Unicode, the derived
>     M> form is, in most cases, a string
> 
> First of all, that's Martin's point!
> 
> Second, almost all Americans, a large majority of Japanese, and I
> would bet most Western Europeans would say you have that backwards.
> That's the problem, and it's the Unicode advocates' problem (ie,
> ours), not the users'.  Even if we're right: education will require
> lots of effort.  Rather, we should just make it as easy as possible to
> do it right, and hard to do it wrong.

I think you've hit the nail squarely on the head.  Even though I /know/
what the intended semantics are, the originality of the string form is
deeply embedded in my nearly 30 years of programming experience, almost
all of it completely American English-centric.  

I always have to stop and think about which direction .encode()
and .decode() go in because it simply doesn't feel natural.  Or more
simply put, my brain knows what's right, but my heart doesn't and that's
why converting from one to the other is always a hiccup in the smooth
flow of coding.  And while I'm sympathetic to MAL's design decisions,
the overlaying of the generalizations doesn't help.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20060221/d6e4091b/attachment.pgp 


More information about the Python-Dev mailing list