sum() requires number, not simply __add__

Antoon Pardon antoon.pardon at rece.vub.ac.be
Fri Feb 24 06:41:32 EST 2012


On 02/24/2012 12:33 AM, Steven D'Aprano wrote:
> If your application stops working after you carelessly mess with
> components your application relies on, the right answer is usually:
>
> "Don't do that then."
>
> 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.

-- 
Antoon Pardon



More information about the Python-list mailing list