title: Python generator next method
body: <p>For the <code>next</code> method of generator, I use the below example. I tried to find the Python documentation for <code>next</code> method, but failed, could anyone help to point out?</p>
  
  <p>The purpose I want to find the official document is I want to look for all forms of <code>next</code> methods and meaning of the 2nd parameter <code>None</code> in my below example.</p>
  
  <pre><code>slice = (x**2 for x in range(0,100))
  first = next(slice, None)
  print first
  for item in slice:
      print item
  </code></pre>