On Fri, Dec 6, 2013 at 7:16 PM, Roy Smith <r...@panix.com> wrote:

> In article <mailman.3672.1386373120.18130.python-l...@python.org>,
>  Joel Goldstick <joel.goldst...@gmail.com> wrote:
>
> > Python lets you iterate over a list directly, so :
> >
> >     for d in originalData:
> >         dateStr, freq, source = d
> >         data[source] = freq
>
> I would make it even simpler:
>
> >     for dateStr, freq, source in originalData:
> >         data[source] = freq
>


+1 --- I agree

To the OP:

Could you add a docstring to your function to explain what is supposed to
happen, describe the input and output?  If you do that I'm sure you could
get some more complete help with your code.

> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to