You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this behaviour - I'm able to easily work around in my case, but noting it here.
In a REPL, Python 3.11, when getsource is invoked inside a decorator function (so trying to get the source of the function that is being decorated right now), partial source is returned (rather than the whole source, or an error). This problem does not happen with the same code in a Python file executed from the command line.
I noticed this behaviour - I'm able to easily work around in my case, but noting it here.
In a REPL, Python 3.11, when getsource is invoked inside a decorator function (so trying to get the source of the function that is being decorated right now), partial source is returned (rather than the whole source, or an error). This problem does not happen with the same code in a Python file executed from the command line.
but in this case, with getsource running much later (getsource is called when the decorated function is invoked), I get the full source:
with demo.py:
The text was updated successfully, but these errors were encountered: