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

Antoine Pitrou solipsis at pitrou.net
Sun Sep 10 13:02:57 CEST 2006


> 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.




More information about the Python-3000 mailing list