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

Cliff Wells LogiplexSoftware at earthlink.net
Mon Nov 18 18:31:22 EST 2002


On Mon, 2002-11-18 at 14:59, Richard Dillingham wrote:
> It doesn't have ()s, so it ain't two tuples. Easy enough, da?

Incorrect.  Consider:

Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> t = 1, 2
>>> t
(1, 2)
>>> type(t)
<type 'tuple'>
>>>

No parentheses, yet still a tuple.  At this point perhaps you should
<ahem> RTFM ;)


Also, please don't top-post.

Regards,


> "Carl Banks" <imbosol at vt.edu> wrote in message
> news:arbqp2$rkb$1 at solaris.cc.vt.edu...
> > Richard Dillingham 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]
> >
> > How would you disambiguate that from a comparison of two tuples?
> >
> >
> > --
> > CARL BANKS
-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20021118/66363190/attachment.sig>


More information about the Python-list mailing list