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>
This commit is contained in:
committed by
Damien George
parent
cd8eea2ae9
commit
7dff38fdc1
@@ -117,6 +117,8 @@
|
||||
#define MICROPY_PY_SYS_STDFILES (1)
|
||||
#define MICROPY_PY_SYS_EXC_INFO (1)
|
||||
#define MICROPY_PY_COLLECTIONS_DEQUE (1)
|
||||
#define MICROPY_PY_COLLECTIONS_DEQUE_ITER (1)
|
||||
#define MICROPY_PY_COLLECTIONS_DEQUE_SUBSCR (1)
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#ifndef MICROPY_PY_MATH_SPECIAL_FUNCTIONS
|
||||
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (1)
|
||||
|
||||
Reference in New Issue
Block a user