Message282523
(C5) setting f_lineno didn't evolve when the rest of the bytecodes evolved,
which means it is not safe any more::
import sys
def f():
try:
raise ValueError # line 5
except ValueError:
print(42) # line 7
def my_trace(*args):
print(args)
if args[1] == 'line':
f = args[0]
if f.f_lineno == 5:
f.f_lineno = 7
return my_trace
sys.settrace(my_trace)
f()
sys.settrace(None) |
|
Date |
User |
Action |
Args |
2016-12-06 11:51:53 | arigo | set | recipients:
+ arigo |
2016-12-06 11:51:53 | arigo | set | messageid: <1481025113.14.0.88132106313.issue28883@psf.upfronthosting.co.za> |
2016-12-06 11:51:53 | arigo | link | issue28883 messages |
2016-12-06 11:51:52 | arigo | create | |
|