New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outdated usage str.encode('rot-13') in rot13 codec #65370
Comments
Function rot13 in file "encodings/rot_13.py" throws exception: LookupError: 'rot-13' is not a text encoding; use codecs.encode() to handle arbitrary codecs |
Here's a patch. I tested it with the following command: $ cat LICENSE | ./python -m encodings.rot_13 |
Since rot_13 is a transcoder, not an encoder, the error message is correct, as is the fix for the function. However, since neither the module encodings.rot_13 nor the rot13 function in the module are documented, (not even in 2.7), I wonder if the function and the if __name__; clause are ancient holdovers that should be removed. In other words, I am not sure if Berker's test is currently a supported usage. I remember that there was some discussion on pydev about how much to add back but not the details. |
LGTM. |
New changeset a81f0caab279 by Serhiy Storchaka in branch '3.4': New changeset f86504da2fcc by Serhiy Storchaka in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: