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

What is the graph = None arg? #17

Closed
qzmfranklin opened this issue Mar 4, 2016 · 4 comments
Closed

What is the graph = None arg? #17

qzmfranklin opened this issue Mar 4, 2016 · 4 comments

Comments

@qzmfranklin
Copy link

What is the point of using a class if you pass in the graph as a parameter anyways?

@thieman
Copy link
Owner

thieman commented Mar 4, 2016

It's a flexibility thing. Without the optional graph arg, you perform stateful operations on the object. If you pass graph in manually, you can use the methods as if they're static methods.

@thieman thieman closed this as completed Mar 4, 2016
@qzmfranklin
Copy link
Author

Just saw you closed the issue.

Then just make it a staticmethod, then call the static method from the class method. Otherwise people cannot figure out the intention without actually understanding the source code. This is just defeating the point of using an API

@thieman
Copy link
Owner

thieman commented Mar 7, 2016

Thanks for your input. This is a tiny library I built for myself; I'm happy other people somehow found it and are using it but I'm not going to contribute any direct maintenance unless it's something I personally need. And I, personally, can use it fine the way it is.

I encourage you to either submit a PR with your changes for review or fork the library. This library is available under the MIT License so you can do basically whatever you want with it. If you make a version significantly better than this one I will probably move over to using yours.

@thieman
Copy link
Owner

thieman commented Mar 7, 2016

I've added a small note to the README to reflect this 84d4835

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