I went based on the current setdefaultencoding. But it seems that we will accumulate 3 or 4 related functions so I'm pursuaded that there should be a module.

encodingdetection.setdefaultfileencoding
encodingdetection. registerencodingdetector
encodingdetection.guessfileencoding(filename)
encodingdetection.guessfileencoding(bytestream)

Suggestion accepted.

On 9/10/06, Antoine Pitrou <[EMAIL PROTECTED]> wrote:

> The Site Decoding Hook
> ========================
>
> The "sys" module could have a function called
> "setdefaultfileencoding". The encoding specified could be a true
> encoding name or one of the encoding detection scheme names ( e.g.
> "guess" or "XML").

Isn't it more intuitive to gather functions based on what their
high-level purpose is ("text" or "textfile") than implementation details
of where the information comes from ("sys", "locale") ?

That function could be "textfile.set_default_encoding" (with
underscores), or even "text.textfile.set_default_encoding " (if all this
resides in a "text" module).

Regards

Antoine.


_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: http://mail.python.org/mailman/options/python-3000/paul%40prescod.net

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to