sum() requires number, not simply __add__

Roy Smith roy at
Fri Feb 24 14:23:54 CET 2012

In article <mailman.123.1330083762.3037.python-list at>,
 Antoon Pardon <antoon.pardon at> wrote:

> > Python doesn't try to prevent people from shooting themselves in the foot.
> >    
> Yes it does! A simple example is None as a keyword to prevent 
> assignments to it.

Hmmm.  Just playing around with some bizarre things to do with None, and 
discovered this:

>>> import sys as None

doesn't give an error, but also doesn't assign the module to the symbol 
'None'.  Weird.

More information about the Python-list mailing list