From 04f588b2bdf0379c30dcde76c44bc559e8b1a8fb Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 13 Jan 2009 20:52:40 +0100 Subject: [PATCH] simplification --- Cython/Compiler/AutoDocTransforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/AutoDocTransforms.py b/Cython/Compiler/AutoDocTransforms.py index 4c26c2ba..dae5926b 100644 --- a/Cython/Compiler/AutoDocTransforms.py +++ b/Cython/Compiler/AutoDocTransforms.py @@ -161,7 +161,7 @@ class EmbedSignature(CythonTransform): if signature: if node.entry.doc is not None: old_doc = node.entry.doc - elif hasattr(node, 'py_func') and node.py_func is not None: + elif getattr(node, 'py_func', None) is not None: old_doc = node.py_func.entry.doc else: old_doc = None -- 2.26.2