operator overloading + - / * = etc...

Paul Rubin http
Tue Oct 10 07:06:48 EDT 2006


"Fredrik Lundh" <fredrik at pythonware.com> writes:
> or for the perhaps-overly-clever hackers,
> 
>     for x in iter(lambda: foo() or None, None):
>         process(x)

  for x in takewhile(bool, (foo() for _ in repeat(None))):
     process(x)

Meh, both are ugly.



More information about the Python-list mailing list