[entity] add function is_leaf on Keywords
authorJulien Jehannet <julien.jehannet@logilab.fr>
Fri, 18 Sep 2009 12:39:32 +0200
changeset 62 de70dc39d97f
parent 61 6e358556dfea
child 63 fdb298a5503a
[entity] add function is_leaf on Keywords
entities.py
--- a/entities.py	Fri Sep 18 12:35:04 2009 +0200
+++ b/entities.py	Fri Sep 18 12:39:32 2009 +0200
@@ -57,6 +57,11 @@
             return self.subkeyword_of[0]
         return self.classification
 
+    def is_leaf(self):
+        if self.reverse_subkeyword_of:
+            return False
+        return True
+
 
 class CodeKeyword(Keyword):
     id = 'CodeKeyword'