Combining the two dequeleads to TypeError.
from collections import deque
q = deque()
q + q
But __iadd__implemented, therefore supported +=.
q1 = deque([1])
q2 = deque([2])
q1 += q2
What is the reason for the implementation __iadd__?
source
share