About that 'yield' word
David Eppstein
eppstein at ics.uci.edu
Sun Oct 5 12:28:13 EDT 2003
In article <yu994qynhi6q.fsf at tinker.research.att.com>,
Andrew Koenig <ark at acm.org> wrote:
> David> def maker():
> David> return range(100)
>
> David> seems a little less contorted...
>
> Maybe so, but it behaves differently so direct comparisons aren't
> particularly helpful:
I considered mentioning iter(range(100)) instead but I couldn't think of
an actual reason one would care about the difference.
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list