Open tsvibt opened 6 months ago
(I don't know if this is intended behavior, so I don't know if it's a bug.)
It seems scalene doesn't see the code for functions loaded by exec. If I have a file like this:
exec
def function(): [x+x for x in range(100000)] [x*x for x in range(100000)] function() function()
and run scalene scalene_test1.py, I get:
scalene scalene_test1.py
But if the file has this:
code = ''' def function(): [x+x for x in range(100000)] [x*x for x in range(100000)] ''' exec(code) function() function()
I get this:
What's up with that? Is this intended behavior?
(I don't know if this is intended behavior, so I don't know if it's a bug.)
It seems scalene doesn't see the code for functions loaded by
exec
. If I have a file like this:and run
scalene scalene_test1.py
, I get:But if the file has this:
I get this:
What's up with that? Is this intended behavior?