Re: [Python-ideas] [Python-Dev] Overloading comparison operator for lists

2019-05-26 Thread Cameron Simpson
This belongs on python-ideas, not python-dev. I've directed replies to this message there. Comments below. On 26May2019 21:52, Montana Burr wrote: NumPy arrays have this awesome feature, where array == 3 does an element-wise comparison and returns a list. For example: np.array([1,2,3,4,5])==3

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread MRAB
On 2019-05-26 21:34, Yanghao Hua wrote: On Sun, May 26, 2019 at 10:25 PM Chris Angelico wrote: On Mon, May 27, 2019 at 6:05 AM Yanghao Hua wrote: > Doesn't matter how it ends up, I > urge the python community do give it a second thought. (Don't you guys > think it is odd that Python can overr

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 10:25 PM Chris Angelico wrote: > > On Mon, May 27, 2019 at 6:05 AM Yanghao Hua wrote: > > Doesn't matter how it ends up, I > > urge the python community do give it a second thought. (Don't you guys > > think it is odd that Python can overrides almost every operation but >

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Chris Angelico
On Mon, May 27, 2019 at 6:05 AM Yanghao Hua wrote: > Doesn't matter how it ends up, I > urge the python community do give it a second thought. (Don't you guys > think it is odd that Python can overrides almost every operation but > not for assignment ... is assignment really worthy being a special

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 9:34 PM Chris Angelico wrote: > Irrelevant though. I've ridden in a car - does that make me a > petrochemical engineer? No of course not. But if you are able to build one faster from scratch, you are. We all know building a house with chisels and hammers is different from

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 8:00 PM David Mertz wrote: > > On Sun, May 26, 2019, 1:12 PM Barry Scott wrote: >> >> You said this: "Well, depends on how we define narrow ... you are writing >> probablythis email on a HDL designed machine ... and the entire world is >> powered by HDL designed silicons

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Chris Angelico
On Mon, May 27, 2019 at 5:25 AM Yanghao Hua wrote: > > On Sun, May 26, 2019 at 7:11 PM Barry Scott wrote: > > You said this: "Well, depends on how we define narrow ... you are writing > > probably > > this email on a HDL designed machine ... and the entire world is > > powered by HDL designed si

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 7:11 PM Barry Scott wrote: > You said this: "Well, depends on how we define narrow ... you are writing > probably > this email on a HDL designed machine ... and the entire world is > powered by HDL designed silicons. that is not small for me at all." > > Which I take to me

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread David Mertz
On Sun, May 26, 2019, 1:12 PM Barry Scott wrote: > You said this: "Well, depends on how we define narrow ... you are writing > probablythis email on a HDL designed machine ... and the entire world is > powered by HDL designed silicons. that is not small for me at all." > > Which I take to mean th

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Barry Scott
> On 26 May 2019, at 17:04, Yanghao Hua wrote: > > On Sun, May 26, 2019 at 11:27 AM Barry Scott wrote: >> I think you are confusing the number of people that use HDL with the amount >> of product created. > > I don't see how I did that but if you intercepted that way I must have > done that

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 11:27 AM Barry Scott wrote: > I think you are confusing the number of people that use HDL with the amount > of product created. I don't see how I did that but if you intercepted that way I must have done that somehow. > Also I was under the impression that HDL tools exis

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Barry Scott
> On 26 May 2019, at 08:07, Yanghao Hua wrote: > > On Sun, May 26, 2019 at 12:04 AM David Mertz wrote: >> >> I don't really understand HDL/Verilog, but I've worked with people who do. >> In fact, I even wrote a pre-processor that transformed the same DSL to >> Python, C++, and Verilog. >>

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 6:05 AM Terry Reedy wrote: > > On 5/25/2019 3:09 PM, Yanghao Hua wrote: > > > @= has all the same issues like <<= or >>=, > > No, it does not > > > in that you are basically > > sacrificing a well known number operation > > because @= is not a number operation at all. Yes

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-26 Thread Yanghao Hua
On Sun, May 26, 2019 at 12:04 AM David Mertz wrote: > > I don't really understand HDL/Verilog, but I've worked with people who do. In > fact, I even wrote a pre-processor that transformed the same DSL to Python, > C++, and Verilog. > > In my mind, the HDL use case is FAR too narrow and specializ