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

Yanghao Hua yanghao.py at gmail.com
Tue Jun 4 08:36:04 EDT 2019


On Tue, Jun 4, 2019 at 2:20 PM Rhodri James <rhodri at 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?

signals are numbers (with arbitrary bit width), all arithmetic ops still holds.


More information about the Python-ideas mailing list