[libvirt] [PATCH 20/22] apibuild: Use list comprehension insteand of map

Radostin Stoyanov posted 22 patches 7 years, 3 months ago
[libvirt] [PATCH 20/22] apibuild: Use list comprehension insteand of map
Posted by Radostin Stoyanov 7 years, 3 months ago
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 docs/apibuild.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docs/apibuild.py b/docs/apibuild.py
index 29c89fd24..f9784f9bd 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -472,8 +472,7 @@ class CLexer:
                 return None
 
             if line[0] == '#':
-                self.tokens = list(map((lambda x: ('preproc', x)),
-                                       line.split()))
+                self.tokens = [('preproc', word) for word in line.split()]
 
                 # We might have whitespace between the '#' and preproc
                 # macro name, so instead of having a single token element
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 20/22] apibuild: Use list comprehension insteand of map
Posted by Daniel P. Berrangé 7 years, 3 months ago
On Sat, Mar 17, 2018 at 02:23:38PM +0000, Radostin Stoyanov wrote:
> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
> ---
>  docs/apibuild.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list