contains-io/typet

Non Object attributes violate the expectations of the __hash__ function.

zancas opened this issue · 1 comments

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.

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