git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


> >     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