Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction with inspect #98

Closed
femtomc opened this issue Aug 21, 2023 · 2 comments
Closed

Interaction with inspect #98

femtomc opened this issue Aug 21, 2023 · 2 comments

Comments

@femtomc
Copy link

femtomc commented Aug 21, 2023

I'm using multi-methods from plum in my library. One issue I've had is that inspect has a difficult time with _BoundFunction -- e.g. inspect.getfile will break on _BoundFunction. What's the proper way to deal with this? Should I forward inspect.getfile to _BoundFunction._f?

@wesselb
Copy link
Member

wesselb commented Aug 22, 2023

Hey @femtomc! Yes, I think forwarding inspect.getfile to _BoundFunction._f._f sounds very sensible (note the double _f). This will show the place where the function is defined for the first time. Is it easy to redirect inspect.getfile to this?

@femtomc
Copy link
Author

femtomc commented Nov 19, 2023

Closing this — as yes, it was :)

@femtomc femtomc closed this as completed Nov 19, 2023
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

No branches or pull requests

2 participants