Issue 1465619: str.decode('rot13') produces Unicode (original) (raw)
Issue1465619
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.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/43170
classification
Title: | str.decode('rot13') produces Unicode | ||
---|---|---|---|
Type: | Stage: | ||
Components: | Documentation | Versions: | Python 2.4 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | doerwalter | Nosy List: | doerwalter, georg.brandl, kjohnson, lemburg |
Priority: | normal | Keywords: |
Created on 2006-04-06 10:05 by kjohnson, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg28121 - (view) | Author: Kent Johnson (kjohnson) * | Date: 2006-04-06 10:05 |
In 3.8.3 Standard Encodings, the table at the bottom listing special encodings says that the result of str.decode('rot13') is a byte string. In Python 2.4.3 it is actually a Unicode string so this table entry should be changed. In [40]: 'abc'.decode('rot13') Out[40]: u'nop' | ||
msg28122 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2006-04-06 10:59 |
Logged In: YES user_id=849994 Walter: Wouldn't make it sense for rot13 to actually output byte strings? | ||
msg28123 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2006-04-06 11:18 |
Logged In: YES user_id=38388 rot 13 returns Unicode because it uses the charmap codec which works this way. I don't see much of a reason to change this. The documentation will have to be updated, though. | ||
msg28124 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2006-04-06 11:25 |
Logged In: YES user_id=849994 Okay. Fixed docs in rev. 43701, 43702. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:16 | admin | set | github: 43170 |
2006-04-06 10:05:48 | kjohnson | create |