➜

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.

作者 cool-RR
收信人 cool-RR
日期 2011-12-14.08:56:35
SpamBayes Score 3.5330737e-07
Marked as misclassified 否
Message-id <1323852996.8.0.468969751026.issue13600@psf.upfronthosting.co.za>
In-reply-to
内容
The `rot_13` codec is supposed to work like this, no?

>>> 'qwerty'.encode('utf-8')
b'qwerty'
>>> 'qwerty'.encode('rot_13')
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    'qwerty'.encode('rot_13')
TypeError: encoder did not return a bytes object (type=str)

>>> b'qwerty'.decode('utf-8')
'qwerty'
>>> b'qwerty'.decode('rot_13')
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    b'qwerty'.decode('rot_13')
  File "C:\Python32\lib\encodings\rot_13.py", line 19, in decode
    return (input.translate(rot13_map), len(input))
AttributeError: 'memoryview' object has no attribute 'translate'
历史
日期 用户 动作 参数
2011-12-14 08:56:37cool-RR修改recipients: + cool-RR
2011-12-14 08:56:36cool-RR修改messageid: <1323852996.8.0.468969751026.issue13600@psf.upfronthosting.co.za>
2011-12-14 08:56:36cool-RR链接issue13600 messages
2011-12-14 08:56:35cool-RR创建