micropython-lib
micropython-lib copied to clipboard
WIP: Update deque
MicroPython's built-in deque lacks many features but is implemented in C so is very lean and fast. The micropython-lib version is implemented in Python and has more features - but should have even more. This is a start toward achieving feature-parity with CPython's deque.
This could possibly be merged as-is (I had to extend deque to supporting porting the progress library to MicroPython) but I'm going to try and add all the other features of deque as well as use as much as possible of the CPython test cases.
chiming in that this helped make some of my cpython code be micropython-compatible.
Note that the built-in deque has had some substantial improvements, see:
https://github.com/micropython/micropython/commit/7dff38fdc190d7b731fad8319d2ae8aa13fde18a
There is little reason to use this Python version now - which is great!
Now that the core collections.deque
class is more fully implemented, I think we should just remove the deque
implementation here. That will prevent any confusion, everyone will just use the built-in version.
I agree; the differences are minimal, so I'll close this. Fantastic to see the built-in deque improved!