On Tue, Jun 4, 2019 at 12:47 PM Jeroen Demeyer <j.deme...@ugent.be> wrote: > > 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 > > would become > > L <== new_list
The part I liked it is, with <== basically all kinds of unnecessary details has been hidden from users. For example, L[:] if appeared at the right hand side, means a copy (not a reference) of L, but now when appear on the left hand side, it behaves like an in-place copy. This two isn't it mentally contradicting each other? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s Code of Conduct: http://python.org/psf/codeofconduct/