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

Indexing via a list #274

Open
scott-griffiths opened this issue Jul 10, 2023 · 0 comments
Open

Indexing via a list #274

scott-griffiths opened this issue Jul 10, 2023 · 0 comments

Comments

@scott-griffiths
Copy link
Owner

A new feature looks to be going into bitarray, which we could either expose directly or utilise for a performance increase in some methods: ilanschnell/bitarray#204

>>> a = BitArray('0x0000')
>>> a[[0, 2, 7]] = 1
>>> a[[0, 2, 7]]
BitArray('0b111')
>>> del a[[0, 2, 7]]

Certainly this should be used in the implementation of set. I think a[iterable] = value is equivalent to a.set(value, iterable so that's not extra functionality. But x = a[iterable] is new - does this suggest we're missing a a.get(iterable) -> BitArray for symmetry? Is del a[iterable] actually a useful thing to be able to do? Maybe.

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

1 participant