Quoting Mensanator <[EMAIL PROTECTED]>: > Actualy, I already get the behaviour I want. sum([1,None]) > throws an exception. I don't see why sum([]) doesn't throw > an exception also
If you take a "start value" and add to it every element of a list, should the process fail if the list is empty? If you don't add anything to the start value, you should get back the start value. Python's sum is defined as sum(sequence, start=0). If sum were to throw an exception with sum([]), it should also throw it with sum([], start=0), wich makes no sense. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list