diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2009-08-11 19:46:31 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2009-08-11 19:46:31 +0000 |
| commit | 8b0e297e563e53c9577ab740518ba5acd34a29ea (patch) | |
| tree | ad78eb5efc24166894cd8f4b51997f32d550aa4a /qpid/python | |
| parent | 7884708b44a9f65c9b3ae501a7a2e659d9f4fd44 (diff) | |
| download | qpid-python-8b0e297e563e53c9577ab740518ba5acd34a29ea.tar.gz | |
added back support for get/setitem on generated classes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@803261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/ops.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/python/qpid/ops.py b/qpid/python/qpid/ops.py index 1f82889164..447f9953df 100644 --- a/qpid/python/qpid/ops.py +++ b/qpid/python/qpid/ops.py @@ -66,6 +66,12 @@ class Compound(object): result[f.name] = getattr(self, f.name) return result + def __getitem__(self, attr): + return getattr(self, attr) + + def __setitem__(self, attr, value): + setattr(self, attr, value) + def dispatch(self, target, *args): handler = "do_%s" % self.NAME if hasattr(target, handler): |
