Skip to content

Word_class compares using < if == is requested #26937

@jdemeyer

Description

@jdemeyer

This is bad because it compares using < and > even if the user only wanted to know if two things were equal:

                    if key_cs < key_co:
                        return rich_to_bool(op, -1)
                    elif key_cs > key_co:
                        return rich_to_bool(op, 1)

Instead, richcmp_item should probably be used here.

CC: @fchapoton

Component: combinatorics

Author: Jeroen Demeyer

Branch/Commit: 7dda4ac

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/26937

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions