[Python-3000] Pre-PEP: Easy Text File Decoding

Guido van Rossum guido at python.org
Sun Sep 10 19:09:17 CEST 2006

On 9/10/06, Nick Coghlan <ncoghlan at gmail.com> wrote:
> The 'additional symbolic values' should be implemented as true encodings
> (i.e., it should be possible to look up 'site', 'guess' and 'locale' in the
> codecs registry, and replace them there as well).

That's hard to do since guessing, at least, may require inspection of
a large portion of the input data before settling upon a specific
choice. The decoding API doesn't have a way to do this AFAIK. And for
encoding (output) it's even more iffy -- if possible I'd like the
guessing function to have access to what was in the file before it was
emptied by the "create" function, or what's at the start before
appending to the end,

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-3000 mailing list