消息 [244458]
Serhiy's patch looks to me like it would pragmatically cover all the cases most likely to affect porting efforts: using the standard library bytes<->bytes codecs through the convenience methods.
For a Python 2 backport, I'm slightly more concerned with exposing the argument in the constructor signature, but see value in being consistent with Python 3 if anyone decides to use this to check a custom codec.
The main advantage this approach has over the typecheck based approach is that it can correctly warn about "data".encode("hex"), while a typecheck based approach can't distinguish that from "text".encode("ascii") |
|
| 日期 |
用户 |
动作 |
参数 |
| 2015-05-30 13:59:13 | ncoghlan | 修改 | recipients:
+ ncoghlan, lemburg, brett.cannon, djmitche, benjamin.peterson, martin.panter, serhiy.storchaka |
| 2015-05-30 13:59:13 | ncoghlan | 修改 | messageid: <1432994353.24.0.920800943297.issue19543@psf.upfronthosting.co.za> |
| 2015-05-30 13:59:13 | ncoghlan | 链接 | issue19543 messages |
| 2015-05-30 13:59:12 | ncoghlan | 创建 | |
|