On Sunday, January 8, 2017 at 3:03:56 AM UTC-6, Marc Mezzarobba wrote:
>
> Travis Scrimshaw wrote:
> > If no coercion is currently known, then coerce_map_from() calls
> > _coerce_map_from_(). If _coerce_map_from_() returns a map, then that
> > map becomes the coercion map. If it simply returns
Travis Scrimshaw wrote:
> If no coercion is currently known, then coerce_map_from() calls
> _coerce_map_from_(). If _coerce_map_from_() returns a map, then that
> map becomes the coercion map. If it simply returns True, then the
> coercion map is constructed by using _element_constructor_() as the
If no coercion is currently known, then coerce_map_from() calls
_coerce_map_from_(). If _coerce_map_from_() returns a map, then that map
becomes the coercion map. If it simply returns True, then the coercion map
is constructed by using _element_constructor_() as the definition of the
map. In ei
Travis Scrimshaw wrote:
> That is not true. Note that Foo.has_coerce_map_from() is not
> Foo._coerce_map_from_(). The method has_coerce_map_from() calls
> _coerce_map_from_, which should either return a coercion map or True,
> and in the latter case, then it uses Foo(bar) to define the coercion
> (
On Wednesday, January 4, 2017 at 7:54:57 AM UTC-6, Marc Mezzarobba wrote:
>
> Daniel Krenn wrote:
> > In the doc of sage.rings.qqbar.AlgebraicRealField._coerce_map_from_
> > there is the following test:
> >
> > sage: K. = QuadraticField(7, embedding=AA(7).sqrt())
> > sage: AA.has_coe
On 2017-01-04 14:54, Marc Mezzarobba wrote:
> Probably because NumberField_generic.__init__() does:
>
> self._populate_coercion_lists_(embedding=embedding)
Ok, I see, thank you.
Daniel
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To
Daniel Krenn wrote:
> In the doc of sage.rings.qqbar.AlgebraicRealField._coerce_map_from_
> there is the following test:
>
> sage: K. = QuadraticField(7, embedding=AA(7).sqrt())
> sage: AA.has_coerce_map_from(K)
> True
>
> Why does this return (correctly) True, although the code of th