Skip to content

Accept a generator of ints as an input #80

@pombredanne

Description

@pombredanne

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions