Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'assign': 0.04; 'sys': 0.05; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; '>>>>': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'am,': 0.12; 'bizarre': 0.16; 'reedy': 0.16; 'roy': 0.16; 'subject:() ': 0.16; 'subject:sum': 0.16; 'syntaxerror:': 0.16; 'weird.': 0.16; 'syntax': 0.16; 'this:': 0.16; 'wrote:': 0.18; '>>>': 0.18; '3.2': 0.18; 'jan': 0.19; 'subject:not': 0.19; "doesn't": 0.22; 'header :In-Reply-To:1': 0.22; 'keyword': 0.24; 'module': 0.26; 'import': 0.27; 'invalid': 0.28; 'example': 0.29; 'none,': 0.30; 'shooting': 0.30; 'subject:number': 0.30; 'header:User-Agent:1': 0.33; 'it.': 0.33; 'header:X-Complaints-To:1': 0.34; 'symbol': 0.34; 'to:addr :python-list': 0.35; 'none': 0.35; 'things': 0.35; 'received:org': 0.36; 'but': 0.37; 'some': 0.38; 'to:addr:python.org': 0.40; 'simple': 0.61; 'discovered': 0.70; 'article,': 0.84; 'does!': 0.84; 'pardon': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: sum() requires number, not simply __add__ Date: Fri, 24 Feb 2012 16:58:11 -0500 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330120806 news.xs4all.nl 6892 [2001:888:2000:d::a6]:53689 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20834 On 2/24/2012 8:23 AM, Roy Smith wrote: > In article, > Antoon Pardon 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. In 3.2 >>> import sys as None SyntaxError: invalid syntax -- Terry Jan Reedy