Construct a Bytecode from the given traceback
(cls, tb, *, show_caches=False, adaptive=False)
| 1077 | |
| 1078 | @classmethod |
| 1079 | def from_traceback(cls, tb, *, show_caches=False, adaptive=False): |
| 1080 | """ Construct a Bytecode from the given traceback """ |
| 1081 | while tb.tb_next: |
| 1082 | tb = tb.tb_next |
| 1083 | return cls( |
| 1084 | tb.tb_frame.f_code, current_offset=tb.tb_lasti, show_caches=show_caches, adaptive=adaptive |
| 1085 | ) |
| 1086 | |
| 1087 | def info(self): |
| 1088 | """Return formatted information about the code object.""" |