I'm wrong or Will we fix the ducks limp?

Sayth Renshaw flebber.crue at gmail.com
Fri Jun 3 19:09:41 EDT 2016


> >     pyqFiles = []
> >     for filename in sorted(file_list):
> >         pyqFiles = pyqFiles.append(pq(filename=my_dir + filename))
> >
> >     return pyqFiles
> 
> [snip]
> > PS I am really having a lot of fun coding.
> 
> To have even more fun, note that the above can be replaced by [untested]:
> 
>     return [pq(filename=my_dir + filename)
>             for filename in sorted(file_list)]
> 
> (By the way, the "pf = pf.append(thing)" construction is weird.
> All you need is pf.append(thing).)
> 
> -- 
>

I got the pf = pf.append(thing) from doing pandas because in pandas its not an inplace function.

Sayth



More information about the Python-list mailing list