Skip to content

Conversation

@Lekensteyn
Copy link
Contributor

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

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 Lekensteyn force-pushed the ioplugin-data-simplify branch from f4440f5 to d7dc719 Compare January 8, 2016 09:41
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reusing data.account_key or data.key was intentional - it plays well with the inheritance

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

Successfully merging this pull request may close these issues.

2 participants