Permalink
Browse files

Some python code-style changes

  • Loading branch information...
1 parent b017ddd commit 405f2656aa3953e2a1464f90897ff9115d875f1b @mhagander committed Jun 22, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 generator.py
View
@@ -85,8 +85,7 @@ def Generate(self):
WHERE age(dat) < '1 month' AND team IS NULL AND approved AND NOT hidden GROUP BY name,blogurl,feedurl ORDER BY 4 DESC,1 LIMIT 20
""")
- for feed in c.fetchall():
- self.topposters.append(PlanetFeed(feed))
+ self.topposters = [PlanetFeed(feed) for feed in c.fetchall()]
if len(self.topposters) < 2: self.topposters = []
c.execute("""
@@ -105,8 +104,7 @@ def Generate(self):
ORDER BY teamcount DESC, teamname, feedcount DESC, feedname;
""")
- for feed in c.fetchall():
- self.topteams.append(PlanetFeed(feed))
+ self.topteams = [PlanetFeed(feed) for feed in c.fetchall()]
if len(self.topteams) < 2: self.topteams = []
c.execute("""

0 comments on commit 405f265

Please sign in to comment.