(code, instruction_index)
| 422 | |
| 423 | |
| 424 | def _get_code_position(code, instruction_index): |
| 425 | if instruction_index < 0: |
| 426 | return (None, None, None, None) |
| 427 | positions_gen = code.co_positions() |
| 428 | return next(itertools.islice(positions_gen, instruction_index // 2, None)) |
| 429 | |
| 430 | |
| 431 | _RECURSIVE_CUTOFF = 3 # Also hardcoded in traceback.c. |
no test coverage detected