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

Method format

python/proton/_data.py:1387–1402  ·  view source on GitHub ↗

Formats the contents of this :class:`Data` object in a human readable way. :return: A Formatted string containing contents of this :class:`Data` object. :raise: :exc:`DataException` if there is a Proton error.

(self)

Source from the content-addressed store, hash-verified

1385 self._check(pn_data_copy(self._data, src._data))
1386
1387 def format(self) -> str:
1388 """
1389 Formats the contents of this :class:`Data` object in a human readable way.
1390
1391 :return: A Formatted string containing contents of this :class:`Data` object.
1392 :raise: :exc:`DataException` if there is a Proton error.
1393 """
1394 sz = 16
1395 while True:
1396 err, result = pn_data_format(self._data, sz)
1397 if err == PN_OVERFLOW:
1398 sz *= 2
1399 continue
1400 else:
1401 self._check(err)
1402 return result
1403
1404 def dump(self) -> None:
1405 """

Calls 2

_checkMethod · 0.95
pn_data_formatFunction · 0.90