#17981: Fix when _coerce_map_from_ which returns a callable
------------------------+------------------------------------
Reporter: tscrim | Owner: tscrim
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: coercion | Keywords:
Merged in: | Authors: Travis Scrimshaw
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+------------------------------------
The following currently results in an error:
{{{
sage: class P(Parent):
....: def __init__(self):
....: Parent.__init__(self, category=Sets())
....: def _coerce_map_from_(self, A):
....: if A == ZZ:
....: return lambda x: self.element_class(self, x)
....: return False
....: Element = ElementWrapper
....:
sage: X = P()
sage: X.has_coerce_map_from(ZZ)
}}}
the reason is `CallableConvertMap` is not being given the correct input
data.
--
Ticket URL: <http://trac.sagemath.org/ticket/17981>
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.