On 2017-12-18 18:31, Simon King wrote:
One way to answer the question whether a coercion from A to B exists is
by implementing the method B._coerce_map_from_.
Right, I was asking the question because I need to implement such a
method for RIF and CIF.
If that method returns "True" then the coercion system knows that
it is right to choose _real_mpfi_() for coercion.
1. Check for a coercion map.
2. If coercion is possible, check for a NamedConvertMap. If so, use that
instead.
No. If there is a coercion map, then (by definition) coercion is possible,
and the coercion map is cached. So, do not use something else instead.
I think it should be the other way around: if a _real_mpfi_() method
exists, it should always be picked as conversion map. The existence of
that method means that somebody explicitly implemented a specific
conversion to RIF. So any other map that the coercion framework can come
up with cannot be as good as this NamedConvertMap using _real_mpfi_().
--
You received this message because you are subscribed to the Google Groups
"sage-devel" 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.