This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doerwalter
Recipients benjamin.peterson, docs@python, doerwalter, ezio.melotti, lemburg, pitrou, pjenvey, serhiy.storchaka, vstinner
Date 2012-12-02.10:38:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354444716.64.0.485382330704.issue16585@psf.upfronthosting.co.za>
In-reply-to
Content
And returning bytes is documented in PEP 383, as an extension to the PEP 293 machinery:

"""To convert non-decodable bytes, a new error handler ([2]) "surrogateescape" is introduced, which produces these surrogates. On encoding, the error handler converts the surrogate back to the corresponding byte. This error handler will be 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 Unicode strings which then get encoded again (also see the discussion below)."""
History
Date User Action Args
2012-12-02 10:38:36doerwaltersetrecipients: + doerwalter, lemburg, pitrou, vstinner, pjenvey, benjamin.peterson, ezio.melotti, docs@python, serhiy.storchaka
2012-12-02 10:38:36doerwaltersetmessageid: <1354444716.64.0.485382330704.issue16585@psf.upfronthosting.co.za>
2012-12-02 10:38:36doerwalterlinkissue16585 messages
2012-12-02 10:38:36doerwaltercreate