title: PEP 424 __length_hint__() - Is there a way to do the same for generators or zips?
body: <p>Just came across this awesome <code>__length_hint__()</code> method for iterators from PEP 424 (<a href="https://www.python.org/dev/peps/pep-0424/" rel="noreferrer">https://www.python.org/dev/peps/pep-0424/</a>). Wow! A way to get the iterator length without exhausting the iterator. </p>
  
  <p>My questions:</p>
  
  <ol>
  <li>Is there a simple explanation how does this magic work? I'm just curious.</li>
  <li>Are there limitations and cases where it wouldn't work? ("hint" just sounds a bit suspicious).</li>
  <li>Is there a way to get the hint for zips and generators as well? Or is it something fundamental only to iterators?</li>
  </ol>
  
  <p><strong>Edit:</strong> BTW, I see that the <code>__length__hint__()</code> counts from current position to the end. i.e. partially consumed iterator will report the remaining length. Interesting.</p>