Commit eb8dda2d authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added more dict API methods

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10052 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ff008128
...@@ -25,7 +25,15 @@ try: ...@@ -25,7 +25,15 @@ try:
def AttrDict_has_key(self, name): def AttrDict_has_key(self, name):
return hasattr(self.ob, name) return hasattr(self.ob, name)
def AttrDict_items(self):
return self.ob.__dict__.items()
def AttrDict_keys(self):
return self.ob.__dict__.keys()
AttrDict.__getitem__ = AttrDict_getitem AttrDict.__getitem__ = AttrDict_getitem
AttrDict.has_key = AttrDict_has_key AttrDict.has_key = AttrDict_has_key
AttrDict.items = AttrDict_items
AttrDict.keys = AttrDict_keys
except ImportError: except ImportError:
pass pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment