Python was designed (was Re: Multi-threading in Python vs Java)

Antoon Pardon antoon.pardon at rece.vub.ac.be
Tue Oct 15 03:48:32 EDT 2013


Op 15-10-13 01:11, Chris Angelico schreef:
> On Tue, Oct 15, 2013 at 6:18 AM, John Nagle <nagle at animats.com> 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



More information about the Python-list mailing list