On Thursday, August 29, 2013 2:08:49 AM UTC-7, Simon King wrote:
>
> Hi Robert, hi Stefan, 
>
>
>  

> If I am not mistaken, containment in sets and dicts relies on cmp and 
> not on ==. Hence, in this case, I think the hash is not to blame. 
>

Indeed, comparing using == works:

sage: H5.<a,b,c> = FractionField(PolynomialRing(ZZ, ['a', 'b', 'c'])) 
sage: S = set([1/(1-c)]) 
sage: (-1)/(c-1) in S 
False
sage: [(-1)/(c-1) == _ for _ in S]
[True]
sage: any([(-1)/(c-1) == _ for _ in S])
True

-- 
John

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
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