Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20766
| References | <91c71e41-b98c-46f6-b3af-bed894cf9d92@kh11g2000pbb.googlegroups.com> <41177e2c-3cf7-4678-8594-5a81290eaa4d@ub4g2000pbc.googlegroups.com> <CAJ6cK1bzw23=_bx-85HTUksQD8nFMhFijs_xJiMeQYCc4kHQcw@mail.gmail.com> <mailman.92.1330034033.3037.python-list@python.org> <4f46ccd2$0$29986$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2012-02-24 10:39 +1100 |
| Subject | Re: sum() requires number, not simply __add__ |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.102.1330040369.3037.python-list@python.org> (permalink) |
On Fri, Feb 24, 2012 at 10:33 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Yes, deleting _sentinel will cause the custom sum to fail, and yes, you > have missed something. > > If the caller wants to mess with your library and break it, they have > many, many ways to do so apart from deleting your private variables. I was looking at the module breaking itself, though, not even waiting for the caller to do it. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sum() requires number, not simply __add__ Buck Golemon <buck@yelp.com> - 2012-02-23 13:19 -0800
Re: sum() requires number, not simply __add__ Buck Golemon <buck@yelp.com> - 2012-02-23 13:23 -0800
Re: sum() requires number, not simply __add__ Arnaud Delobelle <arnodel@gmail.com> - 2012-02-23 21:41 +0000
Re: sum() requires number, not simply __add__ Chris Angelico <rosuav@gmail.com> - 2012-02-24 08:53 +1100
Re: sum() requires number, not simply __add__ Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-23 23:33 +0000
Re: sum() requires number, not simply __add__ Chris Angelico <rosuav@gmail.com> - 2012-02-24 10:39 +1100
Re: sum() requires number, not simply __add__ Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2012-02-24 12:41 +0100
Re: sum() requires number, not simply __add__ Roy Smith <roy@panix.com> - 2012-02-24 08:23 -0500
Re: sum() requires number, not simply __add__ Terry Reedy <tjreedy@udel.edu> - 2012-02-24 16:58 -0500
Re: sum() requires number, not simply __add__ Arnaud Delobelle <arnodel@gmail.com> - 2012-02-23 21:59 +0000
Re: sum() requires number, not simply __add__ Ian Kelly <ian.g.kelly@gmail.com> - 2012-02-23 15:00 -0700
Re: sum() requires number, not simply __add__ Chris Angelico <rosuav@gmail.com> - 2012-02-24 09:04 +1100
Re: sum() requires number, not simply __add__ Arnaud Delobelle <arnodel@gmail.com> - 2012-02-23 22:09 +0000
Re: sum() requires number, not simply __add__ Arnaud Delobelle <arnodel@gmail.com> - 2012-02-23 21:32 +0000
Re: sum() requires number, not simply __add__ Chris Rebert <clp2@rebertia.com> - 2012-02-23 13:32 -0800
Re: sum() requires number, not simply __add__ Buck Golemon <buck@yelp.com> - 2012-02-23 13:38 -0800
Re: sum() requires number, not simply __add__ Ian Kelly <ian.g.kelly@gmail.com> - 2012-02-23 14:54 -0700
Re: sum() requires number, not simply __add__ Stefan Behnel <stefan_ml@behnel.de> - 2012-02-23 22:42 +0100
Re: sum() requires number, not simply __add__ Duncan Booth <duncan.booth@invalid.invalid> - 2012-02-24 11:40 +0000
Re: sum() requires number, not simply __add__ Peter Otten <__peter__@web.de> - 2012-02-24 09:29 +0100
csiph-web