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
gh-117174: Rename <string> to <__interactive_string__> for interactive code objects
Using <string> leads to confusion when linecache it's populated with
<string> entries as the inspect module heavily relies on it. An example:
./python -c "import inspect;x=eval('lambda x: x');print(inspect.getsource(x))"
The code above should trigger an exception because we should not be able
to get the source of x (it's dynamically generated) but if we use
<string> as name for interactive code it will return gives the full string.
0 commit comments