[issue8514] Create fsencode() and fsdecode() functions in os.path
Gregory P. Smith
report at bugs.python.org
Sat May 8 07:25:30 CEST 2010
Gregory P. Smith <greg at krypto.org> added the comment:
+.. function:: fsencode(value)
+
+ Encode *value* to bytes for use in the file system, environment variables or
+ the command line. Use :func:`sys.getfilesystemencoding` and
+ ``'surrogateescape'`` error handler for str, and keep bytes unchanged.
I'd word the latter sentence as:
Uses :func:`sys.getfilesystemencoding` and ``'surrogateescape'`` error handler for strings and returns bytes unchanged.
Otherwise I think this patch looks good. +1
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8514>
_______________________________________
More information about the Python-bugs-list
mailing list