MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / _unpack_float

Function _unpack_float

src/fallback/umsgpack/umsgpack.py:639–644  ·  view source on GitHub ↗
(code, fp, options)

Source from the content-addressed store, hash-verified

637
638
639def _unpack_float(code, fp, options):
640 if code == b'\xca':
641 return struct.unpack(">f", _read_except(fp, 4))[0]
642 elif code == b'\xcb':
643 return struct.unpack(">d", _read_except(fp, 8))[0]
644 raise Exception("logic error, not float: 0x%02x" % ord(code))
645
646
647def _unpack_string(code, fp, options):

Callers

nothing calls this directly

Calls 1

_read_exceptFunction · 0.85

Tested by

no test coverage detected