qrand icon indicating copy to clipboard operation
qrand copied to clipboard

BitCache should implement matching data structures from the collections.abc module

Open pedrorrivero opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

The internal structure of BitCache is very similar to some common data structures. However, it does not implement any of their interfaces, making it incompatible with many of the already existing (and very useful) libraries and functions.

Describe the solution you'd like

BitCache should be refactored so that it adheres to all relevant and applicable data structures from the collections.abc module.

Describe alternatives you've considered

The alternative consists on relying on duck-typing alone.

Additional context

This might require changing the signature of some of the methods already defined, nonetheless, as of June 2021, this would not mean a breaking change; since BitCache and its specific implementations are only used internally.

pedrorrivero avatar May 30 '21 00:05 pedrorrivero