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 ncoghlan
Recipients barry, ezio.melotti, kushal.das, ncoghlan, pitrou, serhiy.storchaka, vstinner
Date 2013-05-19.11:39:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Oops, my review comments don't actually make sense because I looked at the patch in isolation, rather than checking the full context in the module. Sorry about that.

We have 2 different cases to deal with, only one of which currently has a helper function.

I suggest renaming _bytes_from_decode_data to "_bytes_for_decoding" and adding "_bytes_for_encoding". The difference between them is the implicit encoding of pure ASCII strings to bytes in the decoding case and the details of the error message thrown.

The encoding and decoding functions should then use the appropriate coercion helper for both the input data and for altchars.
Date User Action Args
2013-05-19 11:39:03ncoghlansetrecipients: + ncoghlan, barry, pitrou, vstinner, ezio.melotti, serhiy.storchaka, kushal.das
2013-05-19 11:39:03ncoghlansetmessageid: <>
2013-05-19 11:39:03ncoghlanlinkissue17839 messages
2013-05-19 11:39:02ncoghlancreate