From 26e3b681b26c9978c819396e278f43d356d86f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 20 Sep 2001 10:33:38 +0000 Subject: 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). --- Lib/encodings/zlib_codec.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Lib/encodings/zlib_codec.py') diff --git a/Lib/encodings/zlib_codec.py b/Lib/encodings/zlib_codec.py index 035bb0480a..d9f7d043ce 100644 --- a/Lib/encodings/zlib_codec.py +++ b/Lib/encodings/zlib_codec.py @@ -45,8 +45,10 @@ def zlib_decode(input,errors='strict'): class Codec(codecs.Codec): - encode = zlib_encode - decode = zlib_decode + def encode(self, input, errors='strict'): + return zlib_encode(input, errors) + def decode(self, input, errors='strict'): + return zlib_decode(input, errors) class StreamWriter(Codec,codecs.StreamWriter): pass -- cgit v1.2.1