I am rolling my own, and learning Python at the same time.

One more question. Say I want to assemble a list of tuples like this:

modules = ['wsgiref', 'http']
import imp
[(imp.find_module(module)[1], os.path.getmtime(imp.find_module(module)[1])) for 
module in modules]

Can I in some way assign imp.find_module(module)[1] to a variable and reuse it? 
Is this a job for lambda?

Thanks anyone.

-- Gnarlie
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to