summaryrefslogtreecommitdiffstats
path: root/external_libs/python/zmq/sugar/frame.py
diff options
context:
space:
mode:
authorDan Klein <danklei@cisco.com>2015-08-24 18:44:56 +0300
committerDan Klein <danklei@cisco.com>2015-08-24 18:44:56 +0300
commit98bc71b1c21452c3d868c4a4d418a8aeaa5a43af (patch)
tree2e66b9a775f0a5c545caa76f62890f5a5546e231 /external_libs/python/zmq/sugar/frame.py
parent20eb7d362f9bce1951bd61ad3f78cf8f4267d1d5 (diff)
parent36c6c87fe4380b214f8ff8a45dc0213fa109821c (diff)
Merge branch 'master' into dan_stateless
Diffstat (limited to 'external_libs/python/zmq/sugar/frame.py')
-rw-r--r--external_libs/python/zmq/sugar/frame.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/external_libs/python/zmq/sugar/frame.py b/external_libs/python/zmq/sugar/frame.py
new file mode 100644
index 00000000..9f556c86
--- /dev/null
+++ b/external_libs/python/zmq/sugar/frame.py
@@ -0,0 +1,19 @@
+# coding: utf-8
+"""0MQ Frame pure Python methods."""
+
+# Copyright (C) PyZMQ Developers
+# Distributed under the terms of the Modified BSD License.
+
+
+from .attrsettr import AttributeSetter
+from zmq.backend import Frame as FrameBase
+
+
+class Frame(FrameBase, AttributeSetter):
+ def __getitem__(self, key):
+ # map Frame['User-Id'] to Frame.get('User-Id')
+ return self.get(key)
+
+# keep deprecated alias
+Message = Frame
+__all__ = ['Frame', 'Message'] \ No newline at end of file