375 Uses co_lnotab described in Python/compile.c to find the |
375 Uses co_lnotab described in Python/compile.c to find the |
376 line numbers. Produces a sequence: l0, l1, ... |
376 line numbers. Produces a sequence: l0, l1, ... |
377 """ |
377 """ |
378 if hasattr(self.code, "co_lines"): |
378 if hasattr(self.code, "co_lines"): |
379 for _, _, line in self.code.co_lines(): |
379 for _, _, line in self.code.co_lines(): |
380 if line is not None: |
380 if line: |
381 yield line |
381 yield line |
382 else: |
382 else: |
383 # Adapted from dis.py in the standard library. |
383 # Adapted from dis.py in the standard library. |
384 byte_increments = self.code.co_lnotab[0::2] |
384 byte_increments = self.code.co_lnotab[0::2] |
385 line_increments = self.code.co_lnotab[1::2] |
385 line_increments = self.code.co_lnotab[1::2] |