lv_micropython/tests/basics/deque2.py.exp
Dash Peters 7dff38fdc1 py/objdeque: Expand implementation to be doubly-ended and support iter.
Add `pop()`, `appendleft()`, and `extend()` methods, support iteration
and indexing, and initializing from an existing sequence.

Iteration and indexing (subscription) have independent configuration flags
to enable them.  They are enabled by default at the same level that
collections.deque is enabled (the extra features level).

Also add tests for checking new behavior.

Signed-off-by: Damien George <damien@micropython.org>
2024-03-18 14:10:14 +11:00

27 lines
224 B
Plaintext

1
2
3
[3, 4, 5]
[5, 6, 7]
0 1 3
5
IndexError
IndexError
TypeError
TypeError
IndexError
IndexError
None
1
2
3 4
IndexError('empty',)
IndexError('empty',)
2
IndexError('full',)
IndexError('full',)
2
5 6
0
IndexError('empty',)