On Wed, Feb 18, 2009 at 3:58 PM, Nick Alexander <ncalexan...@gmail.com> wrote:
>
>
> On 18-Feb-09, at 3:30 PM, Nicolas M. Thiery wrote:
>
>>
>>       Dear Robert,
>>
>> On Sat, Feb 14, 2009 at 03:57:07PM -0800, Robert Bradshaw wrote:
>>> ...
>>>> Would it be possible to add the following functionality (with
>>>> whatever
>>>> appropriate syntax):
>>>>
>>>>     declare_conversion(source, target, morphism)
>>>>
>>>> which would adds the morphism from source to target to the
>>>> conversion
>>>> list (and probably similarly for coercions). Having some
>>>> restrictions
>>>> on it (like making sure it's called before any coercion/conversion
>>>> is
>>>> attempted) is no problem.
>
> Just for the record, this is exactly what I need.  It's kind of
> already there: you can call ._populate_coercion_lists_() with new
> information and it will do its best to do what you want.  Of course,
> it's risky because the coercion graph isn't always updated correctly,
> but in my situations it works reasonably well.
>
> Nick

Could you give an example.  There's nothing like a list of "Evil
Tricks with ... that you should never do" to help people learn things.
 I just tried to play around with _populate_coercion_lists_ to do some
evil things (e.g., make an automatic coercion from QQ to GF(13)), but
only ended up causing an infinite loop...

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to