MCPcopy Create free account
hub / github.com/apache/qpid-proton / get_dict

Method get_dict

python/proton/_data.py:1429–1447  ·  view source on GitHub ↗

A convenience method for decoding an AMQP map as a Python ``dict``. :returns: The decoded dictionary.

(self)

Source from the content-addressed store, hash-verified

1427 self.exit()
1428
1429 def get_dict(self) -> Dict[Any, Any]:
1430 """
1431 A convenience method for decoding an AMQP map as a Python ``dict``.
1432
1433 :returns: The decoded dictionary.
1434 """
1435 if self.enter():
1436 try:
1437 result = {}
1438 while self.next():
1439 k = self.get_object()
1440 if self.next():
1441 v = self.get_object()
1442 else:
1443 v = None
1444 result[k] = v
1445 finally:
1446 self.exit()
1447 return result
1448
1449 def put_sequence(self, s: List[Any]) -> None:
1450 """

Callers

nothing calls this directly

Calls 4

enterMethod · 0.95
nextMethod · 0.95
get_objectMethod · 0.95
exitMethod · 0.95

Tested by

no test coverage detected