908 fn = filename if filename else "<dis>" |
908 fn = filename if filename else "<dis>" |
909 co = tryCompile(co, fn) |
909 co = tryCompile(co, fn) |
910 except SyntaxError: |
910 except SyntaxError: |
911 return [] |
911 return [] |
912 |
912 |
913 starts = [inst[1] for inst in dis.findlinestarts(co) if inst is not None] |
913 starts = [inst[1] for inst in dis.findlinestarts(co) if inst[1] is not None] |
914 if getall: |
914 if getall: |
915 for x in co.co_consts: |
915 for x in co.co_consts: |
916 if hasattr(x, "co_code"): |
916 if hasattr(x, "co_code"): |
917 starts.extend(linestarts(x)) |
917 starts.extend(linestarts(x)) |
918 return sorted(starts) |
918 return sorted(starts) |