[Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

Cameron Simpson cs at zip.com.au
Tue Apr 28 05:39:46 CEST 2009


On 27Apr2009 21:58, Benjamin Peterson <benjamin at python.org> wrote:
| 2009/4/27 Cameron Simpson <cs at zip.com.au>:
| > PROPOSAL: add to the PEP the following functions:
[...]
| > and for me, I would like to see:
| >  os.setfilesystemencoding(coding)
| >
| > Currently os.getfilesystemencoding() returns you the encoding based on
| > the current locale, and (I trust) the os.* stuff encodes on that basis.
| > setfilesystemencoding() would override that, unless coding==None in what
| > case it reverts to the former "use the user's current locale" behaviour.
| > (We have locale "C" for what one might otherwise expect None to mean:-)
| 
| Time machine! http://docs.python.org/dev/py3k/library/sys.html#sys.setfilesystemencoding

How embarrassing. I thought I'd looked.

It doesn't have the None->return-to-default mode, and I'd like to see
the word "overwritten" replaced by "overidden".

And of course if Martin's PEP gets adopted then the "e.g." cleause needs
replacing:-)
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Do not taunt Happy Fun Coder.


More information about the Python-Dev mailing list