4 Jun 2019 4 Jun '19
I'd like to get rid of all the signal and HDL stuff (whatever that means) in this thread, so I think what the original poster really wants is an "assign in place" operator. Basically, something like += or *= but without the arithmetic.
When you think of it this way, it's not an unreasonable request. There would be at least one major use of this operator within CPython, for lists. With this proposal, the awkward syntax (there are 219 instances of this in the CPython sources)
L[:] = new_list
L <== new_list
The implementation would be completely analogous to the existing in-place arithmetic operators. For example A <== B would become equivalent to A = type(A).__iassign__(A, B).