[sage-devel] Re: Customizing hash for an instance of ?

Sat, 10 Sep 2011 04:17:24 -0700

Oh, and there is of course also a workaround without hacking the python 
source code. That would be by implementing the default __hash__ of a class 
to first look up wether the instance.__dict__.has_key('__hash__') and if so 
then call the instance method.

But maybe you could explain why you want to override the __hash__ of 
particular instances because I think we should find a way around overwriting 
__hash__ for particular instances trough for example subclassing.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to