소스 검색

more list comprehansion fun ...

oz123 11 년 전
부모
커밋
872e010388
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  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):