Re: [Python-ideas] Vectorization [was Re: Add list.join() please]

2019-02-06 Thread Steven D'Aprano
Before I respond to a specific point below, I'd like to make a general observation. I changed the subject line of this sub-thread to discuss a feature of Julia, which allows one to write vectorized code in standard infix arithmetic notation, that applies to any array type, using any existing f

Re: [Python-ideas] Vectorization [was Re: Add list.join() please]

2019-02-06 Thread Steven D'Aprano
On Sun, Feb 03, 2019 at 09:46:44PM -0800, Christopher Barker wrote: > I've lost track if who is advocating what, but: Ironically, I started this sub-thread in response to your complaint that you didn't like having to explicitly write loops/maps. So I pointed out that in Julia, people can use (a

Re: [Python-ideas] Vectorization [was Re: Add list.join() please]

2019-02-06 Thread Chris Angelico
On Thu, Feb 7, 2019 at 4:03 PM Steven D'Aprano wrote: > At the risk of causing confusion^1, we could have a "vector call" > syntax: > > # apply len to each element of obj, instead of obj itself > len[obj] > > which has the advantage that it only requires that we give functions a > __getite