[sage-support] Re: parent of Set

2008-10-14 Thread Martin Rubey
Robert Bradshaw <[EMAIL PROTECTED]> writes: > >> Typically one uses the parent() function when one has an element > >> (such as an integer) and wants it's Parent. This is why it's not an > >> element of the Parent. > > > > Hm, I do not understand that. Why wouldn't one want to use 5.parent (), >

[sage-support] Re: parent of Set

2008-10-14 Thread Robert Bradshaw
On Oct 14, 2008, at 2:02 PM, Martin Rubey wrote: > Robert Bradshaw <[EMAIL PROTECTED]> writes: > >> On Oct 14, 2008, at 1:33 PM, Martin Rubey wrote: >> >>> >>> I believe I understood now: >>> >>> sage: ?parent >>> Type: function >>> >>> Return x.parent() if defined, or type(x)

[sage-support] Re: parent of Set

2008-10-14 Thread Martin Rubey
Robert Bradshaw <[EMAIL PROTECTED]> writes: > On Oct 14, 2008, at 1:33 PM, Martin Rubey wrote: > > > > > I believe I understood now: > > > > sage: ?parent > > Type: function > > > > Return x.parent() if defined, or type(x) if not. > > > > I wonder why this is a function, and n

[sage-support] Re: parent of Set

2008-10-14 Thread Robert Bradshaw
On Oct 14, 2008, at 1:33 PM, Martin Rubey wrote: > > I believe I understood now: > > sage: ?parent > Type: function > > Return x.parent() if defined, or type(x) if not. > > I wonder why this is a function, and not a method of Parent? Typically one uses the parent() function wh

[sage-support] Re: parent of Set

2008-10-14 Thread Martin Rubey
I believe I understood now: sage: ?parent Type: function Return x.parent() if defined, or type(x) if not. I wonder why this is a function, and not a method of Parent? (Am I right that all Sage parents inherit from Parent? Would be great to know this) Set_object inherits fro

[sage-support] Re: parent of Set

2008-10-14 Thread Martin Rubey
"William Stein" <[EMAIL PROTECTED]> writes: > On Tue, Oct 14, 2008 at 4:15 AM, Martin <[EMAIL PROTECTED]> wrote: > > > > Am I doing something wrong in the session below? > > I guess so, given the error messages. > > > I admit that I do not understand python types and methods yet. When > > can

[sage-support] Re: parent of Set

2008-10-14 Thread William Stein
On Tue, Oct 14, 2008 at 4:15 AM, Martin <[EMAIL PROTECTED]> wrote: > > Am I doing something wrong in the session below? I guess so, given the error messages. > I admit that I do not understand python types and methods yet. When > can I apply the functional notation, when the method notation? I