collections.deque constructor does not take keyword arguments
I would like to construct a deque as follows collections.deque(maxlen=10). For this to work, iterables must have a default. The default should be an empty tuple or None, see: https://docs.python.org/3/library/collections.html#collections.deque
maxlen should also support keyword arguments but would not require a default, i.e not optional, since I don't need arbitrarily (unbounded) length deques.
ucollections.deque constructor should accept empty list
I spent some hours on the trying to get the deque constructor to work, and didn't sort it out until I searched this issues list and found some example code that was correct.
Even though the documentation says "iterable must be the empty tuple, and the new deque is created empty", I forgot that these words meant it had to be "()" and kept doing:
>>> from ucollections import deque
>>> q = deque([], 3)
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ValueError:
I don't see why this has to be an error (it's not in CPython), or even why it's beneficial for the implementation to require the initializer to be empty.
I can see that the class is designed to be compatible with the CPython code without sacrificing performance, which is why it has been decided to restrict this to fixed-length deques and only two of the methods. (This means that Micropython code will always run under CPython, but not necessarily the other way round -- as long as you don't use the flags parameter.)
But I think the line has been drawn too close by not allowing empty lists as well as empty tuples in constructor.