#17175: Replace some __cmp__() by rich comparison
-------------------------------------+-------------------------------------
Reporter: aapitzsch | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: misc | Resolution:
Keywords: | Merged in:
Authors: André Apitzsch | Reviewers: R. Andrew Ohana
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/aapitzsch/ticket/17175 | d419515eab7cade4ef3983159d87dd3b10998544
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by aapitzsch):
* status: needs_work => needs_review
Comment:
Replying to [comment:2 ohanar]:
> * In {{{sage.combinat.e_one_star}}} (and in general), why do you change
the expression in {{{__eq__}}} method to use backslashes instead of
parens? According to PEP8, wrapping long lines should be done with parens,
brackets, and braces rather than with backslashes.
Didn't know about it. Fixed now.
> * In {{{sage.combinat.root_system.branching_rules}}},
{{{sage.doctest.*}}}, and {{{sage.rings.finit_rings.residue_field}}},
using {{{not isinstance(other, type(self))}}} is not equivalent to the
previous line of reasoning (i.e. {{{type(self)}}} might be a super class
of {{{type(other)}}}). Instead use something like {{{other.__class__ is
not self.__class__}}} (using {{{__class__}}} is better than {{{type}}} for
duck typing purposes).
>
Fixed this.
> * In {{{sage.dynamics.flat_surfaces.strata}}}, you seemed to have
removed the less than and greater than functionality (that wasn't being
tested by the doctests).
Added functions and tests.
--
Ticket URL: <http://trac.sagemath.org/ticket/17175#comment:6>
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.