#8402: Sanity check for Parent and Elemet
------------------------------+---------------------------------------------
Reporter: hivert | Owner: nthiery
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.4
Component: categories | Keywords: Parent, Element, equality, zero,
one
Author: Florent Hivert | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Here is the summary of what was decided on [http://groups.google.com/group
/sage-devel/t/5d9c32390ffe3c96 sage=devel]:
1 - Any Parent or Element must have an equality methods such that
{{{self == self}}} and {{{self != None}}}. This is not required for
general {{{SageObject}}}.
2 - Element construction should be idempotent. More precisely, for any
element e within parent P, the equality {{{P(e) == e}}} must hold.
Case by case exception such as {{{RealIntervalField}}} are possible.
3 - element of a parent in the category {{{Monoid()}}} (respectively
{{{CommutativeAdditiveMonoid()}}}) must have a {{{__hash__}}} method,
which may raise an error for mutable element but never on {{{.one()}}}
(respectively {{{.zero()}}})
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8402>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.