mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Patch #462635 by Andrew Kuchling correcting bugs in the new
codecs -- the self argument does matter for Python functions (it does not for C functions which most other codecs use).
This commit is contained in:
parent
efc3a3af3b
commit
26e3b681b2
5 changed files with 21 additions and 11 deletions
|
|
@ -44,8 +44,10 @@ def base64_decode(input,errors='strict'):
|
|||
|
||||
class Codec(codecs.Codec):
|
||||
|
||||
encode = base64_encode
|
||||
decode = base64_decode
|
||||
def encode(self, input,errors='strict'):
|
||||
return base64_encode(input,errors)
|
||||
def decode(self, input,errors='strict'):
|
||||
return base64_decode(input,errors)
|
||||
|
||||
class StreamWriter(Codec,codecs.StreamWriter):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue