6 May
2016
6 May
'16
8:41 p.m.
Kyle Lahnakoski wrote:
________try: ____________if null_data[byte] >> bit & 1: ________________return Null ________except IndexError: ____________print(null_data) ____________print(index) ____________print(byte, bit) ____________print(len(self._data), self._data) ____________print(null_def) ____________print(null_data) ____________raise
Using a suitably-defined context manager, it should be possible to write that something like this: with Activity("Getting a bit", lambda: (null_data, index, (byte, bit), (len(self._data), self._data), null_def, null_data): if null_data[byte] >> bit & 1: return Null -- Greg