[Yum-devel] [PATCH] Change map(lambda ... => list comprehensions
James Antill
james at fedoraproject.org
Mon Oct 12 15:11:25 UTC 2009
On Mon, 2009-10-12 at 16:50 +0200, Tim Lauridsen wrote:
> On 10/12/2009 04:16 PM, Seth Vidal wrote:
> >
> >
> > On Mon, 12 Oct 2009, James Antill wrote:
> >
> >> ---
> >> cli.py | 4 ++--
> >> yum/__init__.py | 13 ++++++++-----
> >> yum/depsolve.py | 3 ++-
> >> yum/packages.py | 4 ++--
> >> yum/rpmsack.py | 2 +-
> >> yum/sqlitesack.py | 6 +++---
> >> yumcommands.py | 2 +-
> >> 7 files changed, 19 insertions(+), 15 deletions(-)
> >
> >
> > NACK: I don't think this should go in pre- 3.2.25 - it doesn't fix any
> > bugs and it just introduces too many places for typo errors.
n/p ... I stored it in a branch.
> >> - matches = set(map(lambda x: x.name, matches))
> >> + matches = set((x.name for x in matches))
> Should this not be set([x.name for x in matches])
No. It's a generator expression:
http://www.python.org/doc/2.5.2/ref/genexpr.html
--
James Antill <james at fedoraproject.org>
Fedora
More information about the Yum-devel
mailing list