title: Function for calling a function repeatedly?
body: <p>Consider the hypothetical function <code>repeatcall</code>, that takes as arguments a no-args callable <code>func</code> and a positive integer <code>n</code>, and returns a list whose members are obtained by executing <code>func()</code> <code>n</code> times.  It supports an infinite stream of silly hijinks like:</p>
  
  <pre><code>&gt;&gt;&gt; repeatcall(lambda: id(dict()), 5)
  [45789920, 45788064, 45807216, 45634816, 45798640]
  
  &gt;&gt;&gt; urandom = lambda: struct.unpack('Q', open('/dev/urandom').read(8))[0]
  &gt;&gt;&gt; repeatcall(urandom, 3)
  [3199039843823449742, 14990726001693341311L, 11583468019313082272L]
  
  &gt;&gt;&gt; class Counter(itertools.count): __call__ = itertools.count.next
  &gt;&gt;&gt; repeatcall(Counter(100, -2), 4)
  [100, 98, 96, 94]
  </code></pre>
  
  <p>I could swear that I've seen a function like <code>repeatcall</code> somewhere in the Python 2.x standard libraries, but I can't find it.  If I didn't dream this, where <strong>in the standard library</strong> can I find it?</p>
  
  <p><strong>PS: I know it's trivial to roll one's own, but I hate to reinvent wheels, especially those are already in the standard library.  I am <em>not</em> asking how to roll my own.</strong></p>
  
  <p>Edit: made it <em>even more explicit</em> that I am not asking how to code <code>repeatcall</code>.</p>