[Python-checkins] r72113 - peps/trunk/pep-0383.txt

martin.v.loewis python-checkins at python.org
Wed Apr 29 22:06:30 CEST 2009


Author: martin.v.loewis
Date: Wed Apr 29 22:06:29 2009
New Revision: 72113
Log:
Fix code example.
Specify that the error handler is used on all relevant APIs.
Modified:
 peps/trunk/pep-0383.txt
Modified: peps/trunk/pep-0383.txt
==============================================================================
--- peps/trunk/pep-0383.txt	(original)
+++ peps/trunk/pep-0383.txt	Wed Apr 29 22:06:29 2009
@@ -74,7 +74,8 @@
 To convert non-decodable bytes, a new error handler "python-escape" is
 introduced, which produces these half surrogates. On encoding, the
 error handler converts the half surrogate back to the corresponding
-byte.
+byte. This error handler used used in any API that receives or produces
+file names, command line arguments, or environment variables.
 
 The error handler interface is extended to allow the encode error
 handler to return byte strings immediately, in addition to returning
@@ -119,7 +120,7 @@
 dirname = dirname.decode(fse, "python-escape")
 for fn in os.listdir(dirname):
 # fn is now a str object
- yield fn.encode(fse, "python-escape"
+ yield fn.encode(fse, "python-escape")
 
 Copyright
 =========


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /