Opened 5 years ago

Closed 5 years ago

#21436 closed enhancement (fixed)

replace __cmp__ by __richcmp__ in disjoint_set

Reported by: chapoton Owned by:
Priority: major Milestone: sage-7.4
Component: python3 Keywords:
Cc: slabbe, tscrim, darij, vdelecroix Merged in:
Authors: Frédéric Chapoton Reviewers: Jori Mäntysalo
Report Upstream: N/A Work issues:
Branch: 6376b77 (Commits, GitHub, GitLab) Commit: 6376b77c851a3bb308ae5d94fa72266eff5b1079
Dependencies: Stopgaps:

Status badges

Description

as a step to py3

Change History (9)

comment:1 Changed 5 years ago by chapoton

  • Branch set to u/chapoton/21436
  • Cc slabbe tscrim darij vdelecroix added
  • Commit set to c081ec5e252980bc6e8fddb17a9398907ea382b1
  • Status changed from new to needs_review

New commits:

c081ec5replace __cmp__ by __richcmp__ in disjoint_set

comment:2 Changed 5 years ago by jmantysalo

  • Reviewers set to Jori Mäntysalo

I'll check.

comment:3 Changed 5 years ago by jdemeyer

In

def __richcmp__(self, other, op)

replace op by int op.

comment:4 Changed 5 years ago by git

  • Commit changed from c081ec5e252980bc6e8fddb17a9398907ea382b1 to 6376b77c851a3bb308ae5d94fa72266eff5b1079

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

6376b77trac 21436 one detail

comment:5 Changed 5 years ago by chapoton

done

comment:6 Changed 5 years ago by jmantysalo

  • Status changed from needs_review to needs_work

After this patch:

sage: x = DisjointSet(4)
sage: x.union(2,3)
sage: y = DisjointSet(4)
sage: x < y
True
sage: y < x
True

comment:7 follow-up: Changed 5 years ago by chapoton

It was the same before. Nothing got worse.

comment:8 in reply to: ↑ 7 Changed 5 years ago by jmantysalo

  • Status changed from needs_work to positive_review

Replying to chapoton:

It was the same before. Nothing got worse.

Uh, sorry. I tested with x < y, y > x in 7.3...

comment:9 Changed 5 years ago by vbraun

  • Branch changed from u/chapoton/21436 to 6376b77c851a3bb308ae5d94fa72266eff5b1079
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.