sum() requires number, not simply __add__
Chris Angelico
rosuav at gmail.com
Thu Feb 23 16:53:49 EST 2012
More information about the Python-list mailing list
Thu Feb 23 16:53:49 EST 2012
- Previous message (by thread): sum() requires number, not simply __add__
- Next message (by thread): sum() requires number, not simply __add__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 24, 2012 at 8:41 AM, Arnaud Delobelle <arnodel at gmail.com> wrote: > _sentinel = object() > > def sum(iterable, start=_sentinel): > if start is _sentinel: > > del _sentinel Somewhat off-topic: Doesn't the if statement there do a lookup for a global, which would mean that 'del _sentinel' will cause it to fail? Or have I missed something here? ChrisA
- Previous message (by thread): sum() requires number, not simply __add__
- Next message (by thread): sum() requires number, not simply __add__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list