Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a39938f

Browse files
Issue #21171: Fixed undocumented filter API of the rot13 codec.
Patch by Berker Peksag.
1 parent ecd9e8a commit a39938f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/encodings/rot_13.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def getregentry():
106106
### Filter API
107107

108108
def rot13(infile, outfile):
109-
outfile.write(infile.read().encode('rot-13'))
109+
outfile.write(codecs.encode(infile.read(), 'rot-13'))
110110

111111
if __name__ == '__main__':
112112
import sys

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Core and Builtins
2727
Library
2828
-------
2929

30+
- Issue #21171: Fixed undocumented filter API of the rot13 codec.
31+
Patch by Berker Peksag.
32+
3033
- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
3134

3235
- Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError

0 commit comments

Comments
 (0)