Hmm... An idea: if a,b==c,d:

Richard Dillingham shadowlord13_1 at yahoo.com
Mon Nov 18 16:49:15 EST 2002


Kind of like we have multiple assignments in a line (oldx,oldy=x,y), what do
you think of the ability to have multiple tests in an if statement with only
one == or >=.

This would mean that lines like the following:
if posx>=coords[0] and posy>=coords[1] and posx<=coords[2] and
posy<=coords[3]:

Could be rewritten like so:
if posx,posy>=coords[0],coords[1] and posx,posy<=coords[2],coords[3]






More information about the Python-list mailing list