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

Simplify IOPlugin.Data initialization #29

Open
zenhack opened this issue Jan 3, 2017 · 0 comments
Open

Simplify IOPlugin.Data initialization #29

zenhack opened this issue Jan 3, 2017 · 0 comments

Comments

@zenhack
Copy link
Owner

zenhack commented Jan 3, 2017

Issue by Lekensteyn
Friday Jan 08, 2016 at 00:01 GMT
Originally opened as kuba/simp_le#63


Remove the need to specify every component of Data. This introduces a
new IOPlugin.PersistedData member which is the same as IOPlugin.Data,
except that it is initialized with boolean False instead of None.

Also remove account_key and key from FullChainFile, it is not stored by
ChainFile. Replace a weird IOPlugin.EMPTY_DATA._replace(key=X) hack by
the more intuitive Data(key=X).

The __defaults__ construct is taken from
http://stackoverflow.com/a/18348004 and documented in
https://docs.python.org/2/reference/datamodel.html and
https://docs.python.org/3/reference/datamodel.html


Lekensteyn included the following code: https://github.com/kuba/simp_le/pull/63/commits

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