diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-11-24 09:00:29 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-11-24 09:00:43 +0100 |
commit | 8b6131afbabbfef27980bd2fd7e3fee4f1fd8a5b (patch) | |
tree | 00514564ae90dde30b928c2c1d56e8a61b4e5151 /Cython/Compiler/ModuleNode.py | |
parent | dfd73ac65d3b55af85b4dcc1dda62a141efaad6c (diff) | |
download | cython-0.27.x.tar.gz |
Repair "__richcmp__" generation for special comparison methods with docstrings.0.27.x
Closes #2019.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index d6c322e2b..fb652171e 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2962,8 +2962,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): is_buffer = func.name in ('__getbuffer__', '__releasebuffer__') if (func.is_special and Options.docstrings and func.wrapperbase_cname and not is_buffer): - slot = TypeSlots.method_name_to_slot[func.name] - preprocessor_guard = slot.preprocessor_guard_code() + slot = TypeSlots.method_name_to_slot.get(func.name) + preprocessor_guard = slot.preprocessor_guard_code() if slot else None if preprocessor_guard: code.putln(preprocessor_guard) code.putln('#if CYTHON_COMPILING_IN_CPYTHON') |