Message189580
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:03 | ncoghlan | set | recipients:
+ ncoghlan, barry, pitrou, vstinner, ezio.melotti, serhiy.storchaka, kushal.das |
2013-05-19 11:39:03 | ncoghlan | set | messageid: <1368963543.39.0.147334449636.issue17839@psf.upfronthosting.co.za> |
2013-05-19 11:39:03 | ncoghlan | link | issue17839 messages |
2013-05-19 11:39:02 | ncoghlan | create | |
|