#12269: coercion and conversion for absolute_field
-----------------------------+----------------------------------------------
Reporter: mstreng | Owner: davidloeffler
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.0
Component: number fields | Keywords: coercion conversion
absolute_field number field structure relative absolute
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Comment(by SimonKing):
Replying to [comment:12 lftabera]:
> Forcing coercions exposes other errors in the coercion model:
Right. And here it is (in sage.structure.parent, lines 2300-2303):
{{{
connection = None
if EltPair(mor._domain, S, "coerce") not in
_coerce_test_dict:
connecting = mor._domain.coerce_map_from(S)
if connecting is not None:
}}}
So, apparently someone intended to write "connecting = None", but wrote
"connection = None". Can you try whether writing "connecting = None" fixes
the problem?
> {{{
> K = NumberField([x^2-2, x^2-3], 'a,b')
> M = K.absolute_field('c')
> M_to_K, K_to_M = M.structure()
> M.register_coercion(K_to_M)
> K.register_coercion(M_to_K)
> M.coerce_map_from(QQ)
> ...
> UnboundLocalError: local variable 'connecting' referenced before
assignment
> }}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12269#comment:13>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.