title: Is there an expression for an infinite iterator?
body: <p>Is there a straight-forward expression that can produce an infinite iterator?</p>
  <p>This is a purely theoretical question. No need for a &quot;practical&quot; answer here :)</p>
  <hr />
  <p>For example, it is easy to use a generator expression to make a finite iterator:</p>
  <pre><code>my_gen = (0 for i in xrange(42))
  </code></pre>
  <p>However, to make an infinite one I need to &quot;pollute&quot; my namespace with a bogus function:</p>
  <pre><code>def _my_gen():
      while True:
          yield 0
  my_gen = _my_gen()
  </code></pre>
  <p>Doing things in a separate file and <code>import</code>-ing later doesn't count.</p>
  <hr />
  <p>I also know that <code>itertools.repeat</code> does exactly this. I'm curious if there is a one-liner solution without that.</p>