[Nym3-commit] r501 - trunk/nymbaron/Server

laurent at conuropsis.org laurent at conuropsis.org
Tue Mar 21 17:00:29 CET 2006


Author: laurent
Date: 2006-03-21 17:00:29 +0100 (Tue, 21 Mar 2006)
New Revision: 501

Modified:
   trunk/nymbaron/Server/User.py
Log:
Define __contains__ method for proper container object emulation

Modified: trunk/nymbaron/Server/User.py
===================================================================
--- trunk/nymbaron/Server/User.py	2006-03-21 14:58:01 UTC (rev 500)
+++ trunk/nymbaron/Server/User.py	2006-03-21 16:00:29 UTC (rev 501)
@@ -214,6 +214,9 @@
         """Sets the fields of this Object as if a hashtable"""
         self.data[key] = value
 
+    def __contains__(self, item):
+        return self.data.has_key(item)
+
     def _lock(self):
         """Lock the user. For well behaved functions."""
         self.lock = mixminion.Common.Lockfile(self.config.path + os.sep + 



More information about the Nym3-commit mailing list