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

Peter Pearson pkpearson at nowhere.invalid
Fri Jun 3 12:05:43 EDT 2016


On Fri, 3 Jun 2016 07:20:24 -0700 (PDT), Sayth Renshaw wrote:
[snip]
>     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).)

-- 
To email me, substitute nowhere->runbox, invalid->com.



More information about the Python-list mailing list