Dear Carl,

> The paragraph you quoted was part of a very rough proposal for a way
> that Sage's coercion might be changed in the future; it's definitely
> not how it works now.

My apologies for missing this.  

> Also, the way coercion is implemented now, int(2) does have a parent;
> it's just not available at the .parent() method:
> 
> sage: parent(int(2))
> <type 'int'>

Hum !!! Is there a place where we can find the specification and if not a
description of this parent mechanism. I'm pretty sure that if one grep into
the code on can find at least some code that use those three following
different ways to ask for the parent of an object:
     1) x.parent()
     2) x._parent
     3) parent(x)
In the end, there can be only one ;-)

I though the first one should be used and I realized it cannot be used for
int, whence my e-mail. As far as a understood 2) is an implementation details
and should not be called directly. I've never seen 3). Note that I'm quite new
to Sage and I haven read the entire source right now :-)

Cheers,

Florent

--~--~---------~--~----~------------~-------~--~----~
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