Message71532
Hi Dmitry,
RE the method behaviour: I think it probably is correct to NOT accept a
string. Given that it's base64 encoding it, it only makes sense to
encode bytes, not arbitrary Unicode characters which have no
well-defined binary representation.
RE the method name: I agree, it should be renamed to encodestring. I
argued a similar case for the array.tostring and fromstring methods
(which actually act on bytes in Python 3.0) - here:
http://bugs.python.org/issue3565. So far nobody replied on that issue; I
think it may be too late to rename them. Best we can do is document them.
RE xmlrpc.client:1168. We just checked in a patch to urllib which adds
an unquote_to_bytes function (see
http://docs.python.org/dev/3.0/library/urllib.parse.html#urllib.parse.unquote_to_bytes).
(Unquote itself still returns a string). It should be correct to just
change xmlrpc.client:1168 to call urllib.parse.unquote_to_bytes. (Though
I've not tested it). |
|
Date |
User |
Action |
Args |
2008-08-20 10:03:06 | mgiuca | set | recipients:
+ mgiuca, georg.brandl, pitrou, ddvoinikov |
2008-08-20 10:03:06 | mgiuca | set | messageid: <1219226586.05.0.715091118433.issue3613@psf.upfronthosting.co.za> |
2008-08-20 10:03:05 | mgiuca | link | issue3613 messages |
2008-08-20 10:03:04 | mgiuca | create | |
|