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

Add pickle support #4

Open
snorfalorpagus opened this issue Jul 28, 2016 · 2 comments
Open

Add pickle support #4

snorfalorpagus opened this issue Jul 28, 2016 · 2 comments

Comments

@snorfalorpagus
Copy link
Member

It should be easy to add pickle support to the classes. This could be tied into read/write support for JSON.

(I realise catchment_from_json() exists - I was thinking, Catchment.load() and Catchment.dump().

@jetuk
Copy link
Member

jetuk commented Sep 20, 2016

Would load and dump use a JSON format?

@snorfalorpagus
Copy link
Member Author

Yes. I was thinking that load and dump handle the dictionary of parameters. The __setstate__ and __getstate__ methods could then make use of this, plus a little extra to handle the actual state.

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