(why) inconsistent yield/return syntax?
marklists at mceahern.com
Mon Feb 10 22:11:14 CET 2003
> An empty return is ok and return None, but an empty yield isn't.
> My question is why...
I'm curious whether you can state your question in terms of a goal that you
are trying to accomplish.
"How do I define a zero-length iterator?"
from __future__ import generators
"""Our silly iterator is pointless, but so what."""
l = [x for x in whynot()]
if __name__ == '__main__':
More information about the Python-list