Yes = 

The Walrus operator, poorly used, can caused the problem in the OP, and many, many others.

It does not make a difference - we discussed and got to the conclusion that the benefits
of having it  surpass whatever bad uses people put it for. 

It clearly does not make sense to try to modify the syntax to forbid
"walrus containing expressions inside assert statements", as even
the creation of  a variable inside a conditional `if` block could
have the same effect you are describing, when the code is broken.


 

On Tue, 11 Feb 2020 at 17:22, Soni L. <fakedme+py@gmail.com> wrote:
I should perhaps provide a link to the relevant discussion in the Lua
mailing list. For what it's worth, you'll only be looking at C.

https://marc.info/?l=lua-l&m=157312955532763&w=2

On 2020-02-11 4:55 p.m., jdveiga@gmail.com wrote:
> Sorry, Soni, I do no speak Lua. Can you provide any documentation on that point? I have found a function called assert but I am not sure that it works like assertions in Python.
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-leave@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/A3CYE66PHTP3PSFD6GPGFA2EJQRH4GQL/
> Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/H3VTCEFIGKTHASUNBNDNCV2OMH33NPM2/
Code of Conduct: http://python.org/psf/codeofconduct/