Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Now with CACHE entries, thelasti
could point to a CACHE entry and current line indicator will be confused.
importdisdeff():print(a)dis.disco(f.__code__,lasti=2)dis.disco(f.__code__,lasti=4)
will display
3 0 RESUME 0 4 --> 2 LOAD_GLOBAL 1 (NULL + print) 14 LOAD_GLOBAL 2 (a) 26 PRECALL 1 30 CALL 1 40 POP_TOP 42 LOAD_CONST 0 (None) 44 RETURN_VALUE 3 0 RESUME 0 4 2 LOAD_GLOBAL 1 (NULL + print) 14 LOAD_GLOBAL 2 (a) 26 PRECALL 1 30 CALL 1 40 POP_TOP 42 LOAD_CONST 0 (None) 44 RETURN_VALUE
This is confusing for the users because they would probably not realize that there are CACHE entries. And withshow_caches=False
, we should show the current line to the instruction that the CACHE belongs to.