-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Sets of unhashable elements are broken #33932
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation says "Sets with unhashable objects work, but with less functionality". However, this functionality is actually broken in at least two ways.
First, Sets of unhashable elements fail to recognize equal elements - for example
prints
Set of elements of [2 * 5, 2 * 5]
, that is the resulting Set here contains two identical elements.Second, Set skips the first element when it's created from an iterator of unhashable elements:
This code prints
[[2], [3], [4], [5]]
, that is the first generated element[1]
is missing.A patch for the latter issue was proposed at https://ask.sagemath.org/question/62252/?answer=62285#post-id-62285 which however comes with an overhead.
Depends on #23324
Depends on #34387
CC: @tscrim
Component: misc
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/33932
The text was updated successfully, but these errors were encountered: