gnupeaker at yahoo.com
Mon Mar 22 12:04:41 CET 2004
> Good point. Though to me, it isn't that it's a pain
> for the compiler
> to search for the 'yield' - I don't care about the
> compilers pain. The
> problem is that *I* have to look for the yield and
> might not notice
You are not supposed to be looking for it, IMHO.
Generators follow the Sequence protocol and are to be
treated as sequences. Thus, you should simply make it
clear in the
the function returns a sequence. Whether that
sequence is implemented via a generator or not is an
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
More information about the Python-list