#19628: lazy_import breaks uniqueness of dict keys
-------------------------------------+-------------------------------------
Reporter: cheuberg | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: u/cheuberg/19152 | Commit:
-arb-misc-lazy-import | b21aa6e069182b08aca3cf7c24d6ed24e5926510
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by jdemeyer:
Old description:
> In #19152, a `lazy_import` of `RBF` and `RealBallField` led to the error
> {{{
> sage: PolynomialRing(RealBallField(), 'x') is PolynomialRing(RBF, 'x')
> False
> }}}
New description:
In #19152, a `lazy_import` of `RBF` and `RealBallField` led to the error
{{{
sage: D = dict(); D[RealBallField()] = 1; D[RBF] = 2; D
{Real ball field with 53 bits precision: 2,
Real ball field with 53 bits precision: 1}
}}}
This is despite the keys having equal hashes and comparing equal:
{{{
sage: D.keys()[0] == D.keys()[1]
True
sage: hash(D.keys()[0]) == hash(D.keys()[1])
True
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/19628#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.