MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / __getitem__

Method __getitem__

python/mediumlevelil.py:3303–3314  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

3301 return hash(('MLIL', self._source_function))
3302
3303 def __getitem__(self, i) -> 'MediumLevelILInstruction':
3304 if isinstance(i, slice) or isinstance(i, tuple):
3305 raise IndexError("expected integer instruction index")
3306 elif isinstance(i, MediumLevelILInstruction): # for backwards compatibility
3307 return i
3308 if i < -len(self) or i >= len(self):
3309 raise IndexError("index out of range")
3310 if i < 0:
3311 i = len(self) + i
3312 return MediumLevelILInstruction.create(
3313 self, ExpressionIndex(core.BNGetMediumLevelILIndexForInstruction(self.handle, i)), i
3314 )
3315
3316 def __setitem__(self, i, j):
3317 raise IndexError("instruction modification not implemented")

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected