On Sep 2, 4:14 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Sep 3, 3:52 am, Mensanator <[EMAIL PROTECTED]> wrote: > > > On Sep 2, 11:55 am, Steven D'Aprano <[EMAIL PROTECTED] > > > if (p & 1)==1: > > print_evens = True > > else: > > print_evens = False > > if (p & 2)==2: > > print_odds = True > > else: > > print_odds = False > > if (p & 4)==4: > > print_debug = True > > else: > > print_debug = False > > No, no, no, you've taken "How to write verbose scripts" rather too > literally; try this: > > print_evens = p & 1 > print_odds = p & 2 > print_debug = p & 4
Thanks for that. Luckily, the code only does that once per call. -- http://mail.python.org/mailman/listinfo/python-list