pedrorrivero / qrand

A multiprotocol and multiplatform quantum random number generation framework
https://pypi.org/project/qrand/
Apache License 2.0
24 stars 14 forks source link

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

Open pedrorrivero opened 3 years ago

pedrorrivero commented 3 years ago

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.