On Thu, 4 Sep 2008 10:57:35 -0700 (PDT), Mensanator wrote: > Why then, doesn't > >>>> sum([A for A in [None, None, None, None, None, None] if A != None]) > 0 > > give me an error?
Because "[A for A in [None, None, None, None, None, None] if A != None]" returns an empty list, and sum([]) doesn't return an error. What did you expect? -- Regards, Wojtek Walczak, http://tosh.pl/gminick/ -- http://mail.python.org/mailman/listinfo/python-list