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

issetequal doesn't check IteratorSize #30768

Closed
davidanthoff opened this issue Jan 19, 2019 · 1 comment
Closed

issetequal doesn't check IteratorSize #30768

davidanthoff opened this issue Jan 19, 2019 · 1 comment

Comments

@davidanthoff
Copy link
Contributor

This method kicks in for arbitrary iterables. It shouldn't just call length therefor, but instead first check IteratorSize, and then fall back on some other implementation if it returns SizeUnknown().

@laborg
Copy link
Contributor

laborg commented Feb 15, 2022

This has been changed in the meantime (#32826):

julia/base/abstractset.jl

Lines 439 to 443 in cc345f6

function issetequal(a, b)
haslength(a) && return issetequal(a, Set(b))
haslength(b) && return issetequal(b, Set(a))
return issetequal(Set(a), Set(b))
end

@laborg laborg closed this as completed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants