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).
diff --git a/Lib/encodings/hex_codec.py b/Lib/encodings/hex_codec.py
index ab7d86f..572ff79 100644
--- a/Lib/encodings/hex_codec.py
+++ b/Lib/encodings/hex_codec.py
@@ -44,8 +44,10 @@
class Codec(codecs.Codec):
- encode = hex_encode
- decode = hex_decode
+ def encode(self, input,errors='strict'):
+ return hex_encode(input,errors)
+ def decode(self, input,errors='strict'):
+ return hex_decode(input,errors)
class StreamWriter(Codec,codecs.StreamWriter):
pass