Skip to content

Conversation

@takluyver
Copy link
Contributor

@takluyver takluyver commented Apr 28, 2018

This needs fewer fallbacks than looking at frame.f_globals['__file__'], it's more consistent with how other pieces of Python (tracebacks, pdb) find code from a frame, and it works better for interactive interpreters like IPython, where many fragments of code share the same global namespace.

https://bugs.python.org/issue33375

Fallbacks are no longer needed for when mod.__file__ is unset
@brettcannon brettcannon self-requested a review May 3, 2018 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants