Changes between Version 1 and Version 7 of Ticket #23102


Ignore:
Timestamp:
05/30/17 15:19:03 (4 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23102

    • Property Status changed from new to needs_review
    • Property Cc tscrim added
    • Property Dependencies changed from to #23103
    • Property Branch changed from to u/jdemeyer/ticket/23102
    • Property Commit changed from to 47f97ec88f373697faafeb84579becb064213dc1
  • Ticket #23102 – Description

    v1 v7  
    11Sage has a lot of functionality to deal with "rich comparisons" using `__richcmp__` in Cython or `_richcmp_` in Python or Cython for subclasses of `Element`. However, we are still missing rich comparison support for Python classes which are not subclasses from `Element`.
    22
    3 A good example of this is `RealSet` in `src/sage/sets/real_set.py`. Currently, comparison is implement using `__cmp__`. Changing this to Python 3 comparisons would normally require 6 methods (`__eq__`, `__ne__`, `__lt__`, `__le__`, `__gt__`, `__ge__`). It would be convenient to support this with just one `__richcmp__` method like in Cython.
     3A good example of this is `RealSet` in `src/sage/sets/real_set.py`. Currently, comparison is implemented using `__cmp__`. Changing this to Python 3 comparisons would normally require 6 methods (`__eq__`, `__ne__`, `__lt__`, `__le__`, `__gt__`, `__ge__`). It would be convenient to support this with just one `__richcmp__` method like in Cython.
    44
    55This ticket proposes: