From 680dea8afeb9fb32974c2db772e0b2861c1af4d8 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Sat, 19 Dec 2009 21:59:59 -0500 Subject: [PATCH 1/1] list.mako: map/lambda make Guido sad, use a comprehension In Python jargon this is not actually a "comprehension", which is reserved for list comprehensions, but a "generator expression". Just in case someone cares. svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2719 --- code/templates/list.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/templates/list.mako b/code/templates/list.mako index 7b1fd92..d513763 100644 --- a/code/templates/list.mako +++ b/code/templates/list.mako @@ -104,7 +104,7 @@ ${self.fn.cdromList(defaults.cdrom, "$('cd_or_auto_cd').checked = true;$('autoin ${machine.owner} ${machine.administrator} % if machine.nics: - ${', '.join(map(lambda x: x.ip, machine.nics))} + ${', '.join(nic.ip for nic in machine.nics)} % else: % endif -- 1.7.9.5