Opened 4 years ago

#23212 new defect

Move non-unique-parent code later in _internal_coerce_map

Reported by: roed Owned by:
Priority: major Milestone: sage-8.0
Component: coercion Keywords: sd86.5
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Currently, coercions between equal-but-not-identical parents are always of type DefaultConvertMap or DefaultConvertMap_unique because of a certain code path in Parent._internal_coerce_map. For example,

sage: V = VectorSpace(QQ,1)
sage: W = V.subspace([V.gen(0)])
sage: type(V.coerce_map_from(W))
<type 'sage.structure.coerce_maps.DefaultConvertMap_unique'>

Compare with

sage: V = VectorSpace(QQ,2)
sage: W = V.subspace([V.gen(0)])
sage: type(V.coerce_map_from(W))
<class 'sage.modules.vector_space_morphism.VectorSpaceMorphism'>

Presumably VectorSpaceMorphisms have useful functionality, and we don't want to throw it away in this edge case.

Change History (0)

Note: See TracTickets for help on using tickets.