Does Python need a semantics for and/or over generators ? was : 'xor' operator?
Tim Peters
tim.one at comcast.net
Wed Apr 17 01:11:58 EDT 2002
[Boris Borcic]
> Indeed, shouldn't two generators g1 and g2, when combined
> in an expression of the form e.g. "g1 and g2" or "g1 or g2",
> combine meaningfully to become a third generator ? Respectively
> one that returns a successive value of g2 for every value that
> g1 returns, until one of them returns IterationError,
The Icon language supports operators on generators, and that's a good place
to look for thought-out, battle-tested ideas. "Should" is too judgmental for
me, though <wink>.
More information about the Python-list
mailing list