summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-15 14:23:33 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-15 14:23:33 +0200
commit20a97646abf360aee23009555c91871b15ea2567 (patch)
tree5c524d3b8bcccc5943b8e7e8983cd61c4444d64d
parent3255fb5ec246fb1988e1072a4c0f43d17531c23a (diff)
downloadportato-20a97646abf360aee23009555c91871b15ea2567.tar.gz
portato-20a97646abf360aee23009555c91871b15ea2567.tar.bz2
portato-20a97646abf360aee23009555c91871b15ea2567.zip
Use list-comprehension. Looks nicer and does not imply speed penalties
-rw-r--r--portato/eix/parser.pyx6
1 files changed, 1 insertions, 5 deletions
diff --git a/portato/eix/parser.pyx b/portato/eix/parser.pyx
index d791bf0..01a673f 100644
--- a/portato/eix/parser.pyx
+++ b/portato/eix/parser.pyx
@@ -122,11 +122,7 @@ def vector (file, get_type, nelems = None):
else:
n = nelems
- l = []
- for i in range(n):
- l.append(get_type(file))
-
- return l
+ return [get_type(file) for i in range(n)]
def string (file):
"""