On Mon, Feb 28, 2005 at 04:02:37PM -0500, Benji York wrote:
> Jack Diederich wrote:
> >Ditto for me, plural implies list and singular implies instance, 
> >for (contact) in contacts:
> >   # do something with contact
> 
> May I ask why you place the parenthesis in the for statement?

I like the tuple-ness feel of it and frequently unpack multiple
values in for loops.  I also like the visual feel, it makes it
easy to see what is being unpacked and what is the source.

"for (one, two, three) in somelist:"
versus
"for one, two, three in sometlist:"

Even with a colorizing editor (emacs) I find the first version
easier to read.  YMMV.

-Jack

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to