File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
13
13
class Codec (codecs .Codec ):
14
14
def encode (self , input , errors = 'strict' ):
15
- return (input .translate (rot13_map ), len (input ))
15
+ return (str .translate (input , rot13_map ), len (input ))
16
16
17
17
def decode (self , input , errors = 'strict' ):
18
- return (input .translate (rot13_map ), len (input ))
18
+ return (str .translate (input , rot13_map ), len (input ))
19
19
20
20
class IncrementalEncoder (codecs .IncrementalEncoder ):
21
21
def encode (self , input , final = False ):
22
- return input .translate (rot13_map )
22
+ return str .translate (input , rot13_map )
23
23
24
24
class IncrementalDecoder (codecs .IncrementalDecoder ):
25
25
def decode (self , input , final = False ):
26
- return input .translate (rot13_map )
26
+ return str .translate (input , rot13_map )
27
27
28
28
class StreamWriter (Codec ,codecs .StreamWriter ):
29
29
pass
You can’t perform that action at this time.
0 commit comments