MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / get

Method get

projects/Python/proto/fbe.py:2695–2705  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2693
2694 # Get the optional value
2695 def get(self):
2696 if (self._buffer.offset + self.fbe_offset + 1) > self._buffer.size:
2697 return None, 0
2698
2699 if not self.has_value:
2700 return None, 1
2701
2702 self._buffer.shift(self.fbe_offset + 1)
2703 optional = self.value.get()
2704 self._buffer.unshift(self.fbe_offset + 1)
2705 return optional[0], (1 + optional[1])
2706
2707 # Set the optional value
2708 def set(self, optional):

Callers

nothing calls this directly

Calls 3

shiftMethod · 0.45
getMethod · 0.45
unshiftMethod · 0.45

Tested by

no test coverage detected