On Tuesday, November 19, 2013 5:50:01 PM UTC-8, Volker Braun wrote:
>
> Also, it is perfectly legal to feed values that are not constant across 
> sessions into the hash. E.g. id(self.parent()). 
>

That by itself wouldn't make it invalid to cache and pickle hash values. It 
would just mean the hash is not guaranteed to be the id. Of course it 
doesn't make much sense to cache or pickle a hash that is as cheap as id.

The bullet-proof approach to the problem is to ensure the attributes for 
hash and equality testing are reinstated upon construction. The patch on 
that ticket tries to implement a protocol that makes it a little easier to 
do so. The question is whether we are prepared to take the leap and start 
adopting the protocol widely and if the protocol needs amending.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to