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

Switch custom overloading for single dispatch #5

Closed
maxfischer2781 opened this issue Oct 17, 2018 · 2 comments
Closed

Switch custom overloading for single dispatch #5

maxfischer2781 opened this issue Oct 17, 2018 · 2 comments

Comments

@maxfischer2781
Copy link
Contributor

The standard library includes a singledispatch decorator for overloading functions to generic functions. This would be suitable as a replacement for the custom interface introduced in #1 .

Aside from being standard library, singledispatch has the advantage of keeping even Cython classes open for extension. There is a backport available that covers all versions supported by graph.

@maxfischer2781
Copy link
Contributor Author

Oops, commits reference issue #4 by accident.

@maxfischer2781
Copy link
Contributor Author

graphi.operator is now a module containing the neighbours and density operators. The graphi.operator.interface has been removed. singledispatch is available as graphi.operator.singledispatch.

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

1 participant