Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word_class compares using < if == is requested #26937

Closed
jdemeyer opened this issue Dec 21, 2018 · 7 comments
Closed

Word_class compares using < if == is requested #26937

jdemeyer opened this issue Dec 21, 2018 · 7 comments

Comments

@jdemeyer
Copy link

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

@jdemeyer jdemeyer added this to the sage-8.6 milestone Dec 21, 2018
@jdemeyer
Copy link
Author

@jdemeyer
Copy link
Author

New commits:

7dda4acUse richcmp_item to compare Word_class

@jdemeyer
Copy link
Author

Commit: 7dda4ac

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@tscrim
Copy link
Collaborator

tscrim commented Dec 22, 2018

comment:3

The error in geometry/cone.py seems unrelated. So LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Dec 22, 2018

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Dec 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants