diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-05-09 19:26:28 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-05-09 19:26:28 +0000 |
commit | 603062f5008305e67446ef5b98c51cb2168e54d0 (patch) | |
tree | 4d7bfeb24ae5ae01fa5555da17b90c7e9e82f3ef /python/qpid/spec010.py | |
parent | b0f3edfa2a68ccf34aa7a555d0d37c2e17b8421b (diff) | |
download | qpid-python-603062f5008305e67446ef5b98c51cb2168e54d0.tar.gz |
QPID-1045 and QPID-1041: added a destination attribute to incoming queues, and added a start() method to incoming queues as syntactic sugar for the verbose message flow idiom
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@654918 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/spec010.py')
-rw-r--r-- | python/qpid/spec010.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/python/qpid/spec010.py b/python/qpid/spec010.py index fb625eab65..58d305aa6c 100644 --- a/python/qpid/spec010.py +++ b/python/qpid/spec010.py @@ -170,10 +170,14 @@ class Enum: def __init__(self, name): self.name = name + self._names = () + self._values = () + + def values(self): + return self._values def __repr__(self): - return "%s(%s)" % (self.name, ", ".join([k for k in self.__dict__.keys() - if k != "name"])) + return "%s(%s)" % (self.name, ", ".join(self._names)) class Choice(Named, Node): @@ -192,6 +196,8 @@ class Choice(Named, Node): enum = Enum(node.name) node.spec.enums[node.name] = enum setattr(enum, self.name, self.value) + enum._names += (self.name,) + enum._values += (self.value,) class Composite(Type, Coded): |