#6510: [with patch, needs work] Adds __nonzero__ method to abelian groups
-----------------------+----------------------------------------------------
Reporter: tsutton | Owner: tbd
Type: defect | Status: new
Priority: minor | Milestone: sage-4.1.1
Component: algebra | Keywords: abelian groups
Reviewer: David Roe | Author: tsutton
Merged: |
-----------------------+----------------------------------------------------
Comment(by mvngu):
I assume that I only need to apply the patch {{{trac_6510.3.patch}}}. But
why are there three functions {{{__nonzero__(self)}}} all of which are the
same and reside in the same module, but each block of definition contains
different stuff? For example, after applying {{{trac_6510.3.patch}}}, I
get the following in {{{sage/groups/abelian_gps/abelian_group.py}}}:
{{{
def __nonzero__(self):
return len(self.invariants()) != 0
def __nonzero__(self):
"""
Returns True if this group is nontrivial.
EXAMPLES::
sage: E = EllipticCurve([0,82])
sage: T = E.torsion_subgroup()
sage: bool(T)
False
"""
return len(self.invariants()) != 0
def __nonzero__(self):
"""
Returns True if this group is nontrivial.
EXAMPLES::
sage: E = EllipticCurve([0,82])
sage: T = E.torsion_subgroup()
sage: bool(T) # indirect doctest
False
"""
return len(self.invariants()) != 0
}}}
Choose which block of function definition you want, and upload a new
patch. Preferrably, you should replace {{{trac_6510.3.patch}}} with your
new patch. I'm marking this as needs work. After a new patch is uploaded,
positive review can be reinstated.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6510#comment:7>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---