diff options
author | Mark Florisson <markflorisson88@gmail.com> | 2011-10-03 20:12:53 +0100 |
---|---|---|
committer | Mark Florisson <markflorisson88@gmail.com> | 2011-10-03 20:12:53 +0100 |
commit | 12be176b8332505e1d7dcbcc1836058d6fb054b6 (patch) | |
tree | f8b569b5a41f425b4bd7f07722b2f65a922b4efa /Cython/Compiler/StringEncoding.py | |
parent | 4dd1577766cac0c96f8e9feebc658b6ee94ea64f (diff) | |
download | cython-12be176b8332505e1d7dcbcc1836058d6fb054b6.tar.gz |
Fix python 3 deepcopy & sorting compatiblity
Diffstat (limited to 'Cython/Compiler/StringEncoding.py')
-rw-r--r-- | Cython/Compiler/StringEncoding.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Cython/Compiler/StringEncoding.py b/Cython/Compiler/StringEncoding.py index fb87d4ae9..1ca490efc 100644 --- a/Cython/Compiler/StringEncoding.py +++ b/Cython/Compiler/StringEncoding.py @@ -115,6 +115,9 @@ class EncodedString(_unicode): # otherwise encoding = None + def __deepcopy__(self, memo): + return self + def byteencode(self): assert self.encoding is not None return self.encode(self.encoding) @@ -131,6 +134,9 @@ class BytesLiteral(_bytes): # bytes subclass that is compatible with EncodedString encoding = None + def __deepcopy__(self, memo): + return self + def byteencode(self): if IS_PYTHON3: return _bytes(self) |