#18026: Parent breakage because not every SageObject is idempotent
----------------------------+------------------------
Reporter: vbraun | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: pickling | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+------------------------
Comment (by vdelecroix):
Replying to [comment:2 vbraun]:
> I'm leaning towards not making `parent` a method of `SageObject`. Move
it to `Element`. Not everything fits into the parent/element scheme.
Parents probably don't need a parent class either:
> {{{
> sage: ZZ.parent()
> <type 'sage.rings.integer_ring.IntegerRing_class'>
> }}}
The main reason for the introduction of the `.parent()` method was because
of `MaximaWrapper` which does not inherit from `Element`. But whatever we
do with this method, it is what the function `parent` is doing
{{{
sage: parent(4r)
<type 'int'>
sage: parent(int)
<type 'type'>
}}}
And I would not call it a "parent class" since it is the class of the
object itself that is considered as a parent. Which makes sense.
By the way, the example you wrote in the description of the ticket used to
work in previous versions of Sage?
--
Ticket URL: <http://trac.sagemath.org/ticket/18026#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.