[Python-3000] [Python-Dev] Betas today - I hope
Walter Dörwald
walter at livinglogic.de
Fri Jun 13 19:20:03 CEST 2008
Walter Dörwald wrote:
> [...]
>> Sure, we could do that, but please use a different name,
>> e.g. .encodeall() and .decodeall() - .encode() and .decode()
>> are already stateles (and so would the new methods be), so
>> "stateless" isn't all that meaningful in this context.
>
> I like the names encodeall/decodeall!
>
>> We could also add such a check to the PyCodec_Encode() and _Decode()
>> functions. They currently do not apply the above check.
>>
>> In Python, those two functions are exposed as codecs.encode()
>> and codecs.decode().
>
> This change will probably have to wait for the 2.7 cycle.
BTW, what I noticed is that the unicode-internal codec seems to be broken:
>>> import codecs
>>> codecs.getencoder("unicode-internal")(u"abc")
('a\x00b\x00c\x00', 6)
I would have expected it to return:
>>> import codecs
>>> codecs.getencoder("unicode-internal")(u"abc")
('a\x00b\x00c\x00', 3)
Servus,
Walter
More information about the Python-3000
mailing list