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

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 28 21:45:36 EDT 2019


Yanghao Hua wrote:
> a different assignment behavior in HDL is your assignment does not
> take effect until a delta cycle of zero virtual time has passed. (did
> you really looked at the previous postings? :)

You need to understand that most of the people reading this are not
familiar with the workings and semantics of HDLs, so that phrases
like "delta cycle of zero virtual time" are meaningless word salad.
We need you to tell us what this new kind of assignment will do
in *Python* terms.

> x = 4 should be something like x <== 4 or x := 4 (the latter has been
> taken by the assignment expressions though ...). Such that variable
> initialization (=) and utilization (<==) can be differentiated.

Since you seem to be willing to use a different syntax for this
kind of assignment, my suggestion is something like

    x = Signal()
    ...
    x.next = 4

If I understand correctly what you want to use this for, that
would be both suggestive of the semantics and entirely doable
with existing Python features.

-- 
Greg


More information about the Python-ideas mailing list