Author: liori Date: 2007-08-15 11:29:27 +0200 (Wed, 15 Aug 2007) New Revision: 8496
Modified: branches/jingle/src/common/xmpp/simplexml.py Log: simplexml: consistent interface for xml attributes -- __contains__
Modified: branches/jingle/src/common/xmpp/simplexml.py =================================================================== --- branches/jingle/src/common/xmpp/simplexml.py 2007-08-15 09:28:32 UTC (rev 8495) +++ branches/jingle/src/common/xmpp/simplexml.py 2007-08-15 09:29:27 UTC (rev 8496) @@ -253,6 +253,9 @@ def __delitem__(self,item): """ Deletes node's attribute "item". """ return self.delAttr(item) + def __contains__(self,item): + """ Checks if node has attribute "item" """ + self.has_attr(item) def __getattr__(self,attr): """ Reduce memory usage caused by T/NT classes - use memory only when needed. """ if attr=='T':