operator overloading + - / * = etc...
Paul Rubin
http
Tue Oct 10 07:32:12 EDT 2006
Antoon Pardon <apardon at forel.vub.ac.be> writes:
> >>> for x in takewhile(foo() for _ in repeat(None)):
> ... print x
> ...
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: takewhile expected 2 arguments, got 1
Yeah, I cancelled and posted a followup
for x in takewhile(bool, foo() for _ in repeat(None)):
print x
but I haven't tested either way.
More information about the Python-list
mailing list