> After my patch there are no SET_LINENO opcodes, so execution is > never on the def line[*], so no 'line' trace event is generated for > the def line, so a debugger that only listens to the 'line' events and > ignores the 'call' events will not stop on that line. If the argument list contains embedded tuples, there's code executed to unpack those before the first line of the function. Example: >>> def f(a, (b, c), d): ... print a, b, c, d ... >>> f(1, (2, 3), 4) 1 2 3 4 >>> f(1, 2, 3) Traceback (most recent call last): File "<stdin>", line 1, in ? File "<stdin>", line 1, in f TypeError: unpack non-sequence >>> I hope the debugger will stop *before* this unpacking happens! It does now: >>> import pdb >>> pdb.run("f(1, 2, 3)") > <string>(0)?() (Pdb) s > <string>(1)?() (Pdb) > <stdin>(1)f() (Pdb) TypeError: 'unpack non-sequence' > <stdin>(1)f() (Pdb) q >>> --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4