On Fri, Dec 6, 2013 at 7:16 PM, Roy Smith <[email protected]> wrote:

> In article <[email protected]>,
>  Joel Goldstick <[email protected]> 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