[Python-Dev] bytes.from_hex() (original) (raw)

Chermside, Michael mchermside at ingdirect.com
Wed Mar 1 15:59:35 CET 2006


Ron Adam writes:

While playing around with the example bytes class I noticed code reads

much better when I use methods called tounicode and tostring. [...] I'm not suggesting we start using to-type everywhere, just where it might make things clearer over decode and encode.

+1

I always find myself slightly confused by encode() and decode() despite the fact that I understand (I think) the reason for the choice of those names and by rights ought to have no trouble.

I'm not arguing that it's worth the gratuitous code breakage (I don't have enough code using encode() and decode() for my opinion to count in that matter.) But I will say that if there were no legacy I'd prefer the tounicode() and tostring() (but shouldn't it be 'tobytes()' instead?) names for Python 3.0.

-- Michael Chermside


This email may contain confidential or privileged information. If you believe you have received the message in error, please notify the sender and delete the message without copying or disclosing it.




More information about the Python-Dev mailing list