On 04/06/2019 13:36, Yanghao Hua wrote:
On Tue, Jun 4, 2019 at 2:20 PM Rhodri James<rho...@kynesim.co.uk> wrote:
On 04/06/2019 11:06, Yanghao Hua wrote:
[...] what I needed is an operator that does not
collide with all existing number/matrix operators.
Why?
That's the question that in all your thousands of words of argument you
still haven't answered beyond "because I want it."
Rhodri, I don't know how could I be more specific, help me out here:
signal << (signal << 2) --> the first >> means "assign" and the second
means shift? Do you really think this is readable? Or maybe you have a
better idea I am not aware of?
I'm asking why you want the first "assignment" << *at all*. What is it
about the operation you are doing (which, incidentally, I still don't
get) that makes it *so much* better at expressing what you're doing than
(say) a method call? What's wrong with
signal.suitable_descriptive_verb(signal << 2)
The bar for adding a new operator is intentionally high, and I haven't
seen enough justification to satisfy me yet. Everyone will need to be
able to read this and get your intention, don't forget.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/