new tag_attribute convenience method tls-sprint
authorsylvain.thenault@logilab.fr
Thu, 30 Apr 2009 00:36:32 +0200
branchtls-sprint
changeset 1548 bd225e776739
parent 1547 cb8c15a1e140
child 1549 f87561822e27
new tag_attribute convenience method
rtags.py
--- a/rtags.py	Thu Apr 30 00:36:02 2009 +0200
+++ b/rtags.py	Thu Apr 30 00:36:32 2009 +0200
@@ -42,6 +42,9 @@
                 keys.remove((rtype, tagged, stype, '*'))
         return keys
 
+    def tag_attribute(self, tag, stype, attr):
+        self._tagdefs[(str(attr), 'subject', str(stype), '*')] = tag
+
     def tag_relation(self, tag, relation, tagged):
         assert tagged in ('subject', 'object'), tagged
         stype, rtype, otype = relation