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

Non Object attributes violate the expectations of the __hash__ function. #13

Open
zancas opened this issue Dec 6, 2017 · 1 comment
Assignees

Comments

@zancas
Copy link

zancas commented Dec 6, 2017

If I make a proper typet Object, I can still assign to its attributes at run time, subsequent comparison or hash operations on the resulting instance will now return unexpected results. I believe the solution is to add logic to set_attr to prevent non-Object, or StrictObject assignment.

@zancas zancas self-assigned this Dec 6, 2017
@dangle
Copy link
Contributor

dangle commented Jan 5, 2018

I think it makes sense to use slots for StrictObject. I'm not so sure about with Object though.

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