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

Accept a generator of ints as an input #80

Open
pombredanne opened this issue Sep 1, 2022 · 1 comment
Open

Accept a generator of ints as an input #80

pombredanne opened this issue Sep 1, 2022 · 1 comment
Labels

Comments

@pombredanne
Copy link
Collaborator

We should be able to accept a generator of ints as an input and not only a list.

This is not correct:

>>> from intbitset import *
>>> intbitset([1,2,3])
intbitset([1, 2, 3])
>>> intbitset(iter([1,2,3]))
intbitset([])
>>> def a(seq):
...    yield from seq
... 
>>> intbitset(a([1,2,3]))
intbitset([])

See aboutcode-org/scancode-toolkit#3077 reported by progval

@pombredanne pombredanne added the bug label Sep 1, 2022
@HeWeMel
Copy link

HeWeMel commented Jul 11, 2024

I ran into this. Ok, the docs say "rhs ... sequence". But they also say "Emulates the Python built-in set class interface".

Thanks for the package. This comment is just to inform you. No pressure.

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

No branches or pull requests

2 participants