Opened 6 years ago

Closed 6 years ago

#22379 closed enhancement (fixed)

py3: simplify richcmp of integer ring and polynomial classes

Reported by: chapoton Owned by:
Priority: major Milestone: sage-7.6
Component: python3 Keywords:
Cc: jmantysalo, tscrim, aapitzsch, jdemeyer Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 58890e5 (Commits, GitHub, GitLab) Commit: 58890e5ae2dd40e696403d333690b56bf46a7e3a
Dependencies: Stopgaps:

Status badges

Description (last modified by chapoton)

By getting rid of the calls to _richcmp.

This is a first step towards the aim of getting rid of _richcmp everywhere. There will remain to handle 2 other calls elsewhere.

Change History (10)

comment:1 Changed 6 years ago by chapoton

Branch: u/chapoton/22379
Commit: 1564b84df82c99a72e1b013640f56d7e8db7b027

New commits:

1564b84py3 : try to simplify (rich)cmp of IntegerRing_class

comment:2 Changed 6 years ago by jdemeyer

I'd rather fix this as part of #22344.

comment:3 Changed 6 years ago by git

Commit: 1564b84df82c99a72e1b013640f56d7e8db7b0276fde1263ed53dc6790b67e36b509be53fd24e33a

Branch pushed to git repo; I updated commit sha1. New commits:

5212fb8Merge branch 'u/chapoton/22379' in 7.6.b4
6fde126trac 22379 get rid of _richcmp in polynomials

comment:4 Changed 6 years ago by git

Commit: 6fde1263ed53dc6790b67e36b509be53fd24e33a0e413822360448acefd570c20fa140da555858e9

Branch pushed to git repo; I updated commit sha1. New commits:

0e41382trac 22379 some doctests fixed

comment:5 Changed 6 years ago by git

Commit: 0e413822360448acefd570c20fa140da555858e91284b260be18bc7885ef14affe335fb9586bce51

Branch pushed to git repo; I updated commit sha1. New commits:

1284b26trac 22379 fixing doctests in a better way

comment:6 Changed 6 years ago by chapoton

Cc: jmantysalo tscrim aapitzsch jdemeyer added
Description: modified (diff)
Status: newneeds_review
Summary: py3: try to simplify richcmp of integer ring classpy3: simplify richcmp of integer ring and polynomial classes

it seems that the bot is mostly green, please review

comment:7 Changed 6 years ago by git

Commit: 1284b260be18bc7885ef14affe335fb9586bce5158890e5ae2dd40e696403d333690b56bf46a7e3a

Branch pushed to git repo; I updated commit sha1. New commits:

58890e5trac 22379 undo one unnecessary change

comment:8 Changed 6 years ago by chapoton

Bot is now squarely green.

This is a simplification of the comparison framework. Once the same thing is done in #22427 for the remaining 2 calls to _richcmp (in complex numbers), one will be able to get rid of _richcmp. Let me recall that handling the comparison is one of the major problems standing on our way to python3.

Last edited 6 years ago by chapoton (previous) (diff)

comment:9 Changed 6 years ago by tscrim

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

While I fundamentally agree with Jeroen, I think it is better for us to make progress in the more immediate as work on #22344 has currently stalled.

comment:10 Changed 6 years ago by vbraun

Branch: u/chapoton/2237958890e5ae2dd40e696403d333690b56bf46a7e3a
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.