structs.arrays module¶
- structs.arrays.prev(iterable)[source]¶
Iterate in reverse over an iterable type supporting the __prev__ API
- class structs.arrays.BaseList(*args, **kwargs)[source]¶
Bases: list
Custom list subclass with some additional iteration functionality
- next()¶
Handle next iteration functionality
- prev()¶
Add basic implementation of the prev API
- class structs.arrays.BitArray(iterable=())[source]¶
Bases: list
A bit array (also known as bitmap, bitset, bit string, or bit vector) is an array data structure that compactly stores bits. It can be used to implement a simple set data structure. A bit array is effective at exploiting bit-level parallelism in hardware to perform operations quickly.
- class structs.arrays.SortedList(iterable=(), key=None, reverse=False)[source]¶
Bases: list
A list implementation that always maintains a sorted order
- class structs.arrays.CircularArray(*args, **kwargs)[source]¶
Bases: structs.arrays.BaseList
A list subclass that will continually iterate until explicitly broken out of. ie, you’re probably going to want a return or break in a loop over a CircularArray