Sfoglia il codice sorgente

more list comprehansion fun ...

oz123 11 anni fa
parent
commit
872e010388
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      pwman/ui/cli.py

+ 2 - 4
pwman/ui/cli.py

@@ -853,10 +853,8 @@ class PwmanCliNew(PwmanCli):
 
         taglist = tools.getinput("Tags: ", defaultstr, complete)
         tagstrings = taglist.split()
-        tags = []
-        for tn in tagstrings:
-            _Tag = Tag(tn)
-            tags.append(_Tag)
+        tags = [Tag(tn) for tn in tagstrings]
+
         return tags
 
     def do_list(self, args):