-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
This sort can fail if the points are not comparable:
sortkey = lambda e: [(0 if x is None else 2 if isinstance(x, str) else 1, x) for x in e]\
if isinstance(e, tuple) else e
self._points = sorted(points, key=sortkey)
The sortkey
tries to find a clever way to "sort" the points but hardcoding classes like that is not a general solution. In particular, it's still comparing integers and strings when #22029 is appplied.
Instead, just don't sort.
CC: @vinklein
Component: combinatorics
Author: Jeroen Demeyer
Branch/Commit: a354dc1
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/26938