27.09.17 15:56, Victor Stinner пише: > In bpo-29400, it was proposed to add the ability to trace not only > function calls but also instructions at the bytecode level. I like the > idea, but I don't see how to extend sys.settrace() to add a new > "trace_instructions: bool" optional (keyword-only?) parameter without > breaking the backward compatibility. Should we add a new function > instead? I afraid that this change breaks an assumption in frame_setlineno() about the state of the stack. This can corrupt the stack if you jump from the instruction which is a part of Python operation. For example FOR_ITER expects an iterator on the stack. If you jump to the end of the loop from the middle of an assignment operator and skip say STORE_FAST, you will left an arbitrary value on the stack. This can lead to unpredictable consequences.
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