Message312775
rot13 codec does a str translate operation. But it doesn't check the input type and then the error message would be quite confusing, especially for bytes:
>>> codecs.encode(b'abc', 'rot13')
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/rot_13.py", line 15, in encode
return (input.translate(rot13_map), len(input))
TypeError: a bytes-like object is required, not 'dict'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: encoding with 'rot13' codec failed (TypeError: a bytes-like object is required, not 'dict') |
|
Date |
User |
Action |
Args |
2018-02-25 05:22:05 | xiang.zhang | set | recipients:
+ xiang.zhang, serhiy.storchaka |
2018-02-25 05:22:05 | xiang.zhang | set | messageid: <1519536125.53.0.467229070634.issue32943@psf.upfronthosting.co.za> |
2018-02-25 05:22:05 | xiang.zhang | link | issue32943 messages |
2018-02-25 05:22:04 | xiang.zhang | create | |
|