Hmm... An idea: if a,b==c,d:
Gonçalo Rodrigues
op73418 at mail.telepac.pt
Mon Nov 18 17:56:43 EST 2002
On Mon, 18 Nov 2002 21:49:15 GMT, "Richard Dillingham"
<shadowlord13_1 at yahoo.com> wrote:
>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]
>
>
Hmm, can't you do that already with tuples? It is just an extra pair of
parenthesis...
All the best,
Gonçalo Rodrigues
More information about the Python-list
mailing list