News for hackers. Stuff that matters.
Re:Dungeons and Dragons Co-Creator Dies at 61 by lacker on Friday April 10, 2009 @10:34AM (#556094)
Just FYI, you can clean this up a teeny bit by removing the square brackets to make it a generator expression. Not a big deal but someone might be enlightened.

  sum(random.randint(1, 6) for _ in range(3))
Re:Dungeons and Dragons Co-Creator Dies at 61 by thomaspaine on Friday April 10, 2009 @10:51AM (#556120)
Doh! You're right. And I just read an article yesterday comparing the speed of generators with list comprehensions http://ikanobori.jp/weblog/2009/04/08/python-sum-of-file-gen...