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>
27 lines
224 B
Plaintext
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',)
|