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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4