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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to