We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c291f0 commit c4d4d7dCopy full SHA for c4d4d7d
Lib/bdb.py
@@ -7,6 +7,7 @@
7
import weakref
8
from contextlib import contextmanager, suppress
9
from inspect import CO_GENERATOR, CO_COROUTINE, CO_ASYNC_GENERATOR
10
+from types import CodeType
11
12
__all__ = ["BdbQuit", "Bdb", "Breakpoint"]
13
@@ -183,7 +184,7 @@ def _get_executable_linenos(code):
183
184
if lineno is not None:
185
linenos.add(lineno)
186
for const in code.co_consts:
- if hasattr(const, 'co_lines'):
187
+ if isinstance(const, CodeType):
188
linenos |= _get_executable_linenos(const)
189
return linenos
190
0 commit comments