naming convention for scalars, lists, dictionaries ...
Jack Diederich
jack at performancedrivers.com
Mon Feb 28 15:26:41 EST 2005
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
More information about the Python-list
mailing list