Multiple equates

Cameron Laird claird at
Mon Nov 17 21:54:44 CET 2008

In article <mailman.4155.1226950874.3487.python-list at>,
Tim Chase  <python.list at> wrote:
>To the OP, I think rather than cluttering my code, I'd just 
>create a loop
>   for i in [x1,x2,x3,x4,...x1024]:
>     a[i] = False
I much prefer this, too.

I've been trying to decide if there's any sober reason to advocate
the one-liner

    map(lambda i: a.__setitem__(i, False), [x1, x2, x3, ..., x1024])

My answer:  no.

More information about the Python-list mailing list