title: Deque random acces O(n) in python while O(1) in C++, why?
body: <p>C++ <a href="http://en.cppreference.com/w/cpp/container/deque" rel="noreferrer">deque</a>:</p>
  
  <blockquote>
    <p>Random access - constant O(1)</p>
  </blockquote>
  
  <p>Python <a href="https://docs.python.org/3/library/collections.html#collections.deque" rel="noreferrer">deque</a>:</p>
  
  <blockquote>
    <p>Indexed access is O(1) at both ends but slows to O(n) in the middle.</p>
  </blockquote>
  
  <p>If I'm not missing anything, everything else is equally fast for deques in python and in C++, at least complexity-wise. Is there anything that makes python's deque better for some cases? If not, why don't they just switch to what C++ has?</p>