Roy Smith roy at
Tue Mar 4 17:14:13 CET 2014

In article <mailman.7726.1393948954.18130.python-list at>,
 Chris Angelico <rosuav at> wrote:

> On Wed, Mar 5, 2014 at 2:42 AM, Steven D'Aprano
> <steve+comp.lang.python at> wrote:
> > # I never know when to stop
> > if bool(flag) is True is True is True is True is True is True: ...
> The banana problem.
> ChrisA

You can refactor that as:

eval(" is ".join(itertools.chain(["if bool(flag)"], [str(t) for t in 

More information about the Python-list mailing list