Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:134': 0.05; 'mess': 0.07; 'python': 0.08; 'relies': 0.09; 'am,': 0.12; '"don\'t': 0.16; 'subject:() ': 0.16; 'subject:sum': 0.16; 'wrote:': 0.18; 'subject:not': 0.19; "doesn't": 0.22; 'header:In- Reply-To:1': 0.22; 'stops': 0.23; 'keyword': 0.24; 'example': 0.29; 'shooting': 0.30; 'subject:number': 0.30; 'on,': 0.31; 'components': 0.32; 'header:User-Agent:1': 0.33; 'it.': 0.33; 'steven': 0.34; 'to:addr:python-list': 0.35; 'none': 0.35; 'application': 0.40; 'to:addr:python.org': 0.40; 'simple': 0.61; 'your': 0.61; 'does!': 0.84; 'pardon': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8KAFV2R0+GuA9G/2dsb2JhbABChTqCWad3hVsBAQUjFUARCxgCAgUWCwICCQMCAQIBRRMIAogCrRyKGIEvjAIBAgsEBQoDAwcDAgUKFQIBAgECAoYeggiBFgSVO4VKg3GJNQ Date: Fri, 24 Feb 2012 12:41:32 +0100 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120207 Icedove/3.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: sum() requires number, not simply __add__ References: <91c71e41-b98c-46f6-b3af-bed894cf9d92@kh11g2000pbb.googlegroups.com> <41177e2c-3cf7-4678-8594-5a81290eaa4d@ub4g2000pbc.googlegroups.com> <4f46ccd2$0$29986$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <4f46ccd2$0$29986$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330083762 news.xs4all.nl 6852 [2001:888:2000:d::a6]:46751 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20800 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