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

Support for static or class methods #107

Closed
csala opened this issue Sep 27, 2019 · 0 comments · Fixed by #109
Closed

Support for static or class methods #107

csala opened this issue Sep 27, 2019 · 0 comments · Fixed by #109
Assignees
Milestone

Comments

@csala
Copy link
Contributor

csala commented Sep 27, 2019

Sometimes it would be useful to be able to call a static or class method, or even an unbound method, passing an instance as the first method.

An example would be pandas.DataFrame.dropna, which could be called as pandas.DataFrame.dropna(X).

However, the current import_object implementation fails to support this, because it expects pandas.DataFrame to be a module.

To fix this, import_object should work recursively, trying to import the parent module if an import fails.

@csala csala self-assigned this Sep 27, 2019
@csala csala added this to the 0.3.4 milestone Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant