]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
apibuild: Use list comprehension insteand of map
authorRadostin Stoyanov <rstoyanov1@gmail.com>
Tue, 20 Mar 2018 06:49:04 +0000 (06:49 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 20 Mar 2018 12:13:36 +0000 (12:13 +0000)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
docs/apibuild.py

index f073b36c7e9ddff157fe542ebfd88f0c0b131e06..98224c7e73302f1b89fea4cb5e446f23dd5d7660 100755 (executable)
@@ -471,8 +471,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