python: iterator from a function
<p>What is an <a href="http://stackoverflow.com/questions/302459/what-is-a-programming-idiom">idiomatic</a> way to create an infinite iterator from a function? For example</p>

<pre><code>from itertools import islice
import random
rand_characters = to_iterator( random.randint(0,256) )
print ' '.join( islice( rand_characters, 100))
</code></pre>

<p>would produce 100 random numbers</p>
