-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
Tested on python 3.14, flint 0.8.0.
I observe that
>>> from flint import nmod
>>> a = nmod(1,7)
>>> hash(a)==hash(nmod(1,7))
False
>>> hash(nmod(1,7))==hash(nmod(1,7))
True
>>> a == nmod(1,7)
True
a and nmod(1,7) got different hash values.
After some conversations with Gemini, it seems in nmod.pyx:
def __hash__(self):
return hash((int(self.val), self.modulus))
which in fact should be self.modulus() since it is a method, not a property.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels