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

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

On Fri, 3 Jun 2016 07:20:24 -0700 (PDT), Sayth Renshaw wrote:
>     pyqFiles = []
>     for filename in sorted(file_list):
>         pyqFiles = pyqFiles.append(pq(filename=my_dir + filename))
>     return pyqFiles

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