Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'operator': 0.03; 'received:134': 0.05; 'subject:Python': 0.06; 'arrays': 0.09; 'differently.': 0.09; 'escape': 0.09; 'python': 0.11; 'language.': 0.14; '"+"': 0.16; 'numpy': 0.16; 'subject:Java': 0.16; 'wrote:': 0.18; 'example': 0.22; 'header :User-Agent:1': 0.23; 'library,': 0.24; 'sort': 0.25; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'designer': 0.30; 'class': 0.32; 'subject: (': 0.35; "can't": 0.35; 'operations': 0.35; 'but': 0.35; 'to:addr :python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'john': 0.61; 'such': 0.63; 'choose': 0.64; 'different': 0.65; 'occur': 0.65; 'natural': 0.68; 'naturally.': 0.84; 'pardon': 0.84; '2013': 0.98 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAIvyXFKGuA9G/2dsb2JhbABZxjWBNIMZAQEEAXgRCyEWDwkDAgECAUUTBgICh3wGtA6JFI9RFoQPA5gEhiSLXoMm Date: Tue, 15 Oct 2013 09:48:32 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python was designed (was Re: Multi-threading in Python vs Java) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381823314 news.xs4all.nl 15919 [2001:888:2000:d::a6]:51947 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56846 Op 15-10-13 01:11, Chris Angelico schreef: > On Tue, Oct 15, 2013 at 6:18 AM, John Nagle wrote: > >> Operator "+" as concatenation for built-in arrays but addition >> for NumPy arrays. > > ... NumPy definitely isn't part of the language. It's not even part of > the standard library, it's fully third-party. That doesn't matter. Adding and concating are different operations and their are types in which both occur rather naturally. So as a designer of such a class you have to choose for which operation you use the natural python operator and for which operation you have to do it differently. NumPy is just an example that you can't escape this sort of incompatibilities in python. -- Antoon Pardon