simplification
authorStefan Behnel <scoder@users.berlios.de>
Tue, 13 Jan 2009 19:52:40 +0000 (20:52 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 13 Jan 2009 19:52:40 +0000 (20:52 +0100)
Cython/Compiler/AutoDocTransforms.py

index 4c26c2ba79e55bca6c7c920db49cd9a981dc8a40..dae5926bd85a39450721d5c5b4c7b248403380d2 100644 (file)
@@ -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