> Sorry to reply to myself when I should have done my research beforehand. > The issue is that multivariate polynomials over ZZ override hash and hash > the tuple of tuples of exponents (roughly speaking). This is in stark > contrast to the default implementation that hashes the string > representation of an object. Thus, the hashes of mpolys over ZZ hash > entirely differently than the fractionfield of mpolys over ZZ and hence the > hashes are not equal.
Hashing the string representation of self is a nice quick way to implement hashing but it is definitely quite inefficient however you want to look at it. I think writing more clever hashing functions is the right way to go. Also, Python internally doesn't hash string representations. Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---