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

Two underscores in state attribute of MapSet class #640

Open
atrettin opened this issue Sep 22, 2020 · 0 comments
Open

Two underscores in state attribute of MapSet class #640

atrettin opened this issue Sep 22, 2020 · 0 comments

Comments

@atrettin
Copy link
Contributor

atrettin commented Sep 22, 2020

When storing/retrieving Map and MapSet objects from dictionaries, one might need the _state_attrs attribute. There are two inconsistencies:

First:

https://github.com/IceCubeOpenSource/pisa/blob/14ed3716eeb5c7ca3a78e55555ef2ef5b774b966/pisa/core/map.py#L2066

In all other classes, the slots of the serializable state are in the class attribute _state_attrs. Only in MapSet, this begins with two underscores. This makes it impossible to access the attribute.

Second:

https://github.com/IceCubeOpenSource/pisa/blob/14ed3716eeb5c7ca3a78e55555ef2ef5b774b966/pisa/core/map.py#L298

The state attributes listed are not identical to those in the serializable state, because error_hist is missing. Is this intentional? Maybe there is something I am not getting. Is the _state_attrs not supposed to list the keys one expects in a dictionary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants