> However, in the case of assertions, a nice and secure feature of Python has > been lost without any apparent benefit.
It's always been possible to have side effects from an assertion: >>> always Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'always' is not defined >>> def f(): ... global always ... always = True ... return True ... >>> assert f() >>> always True The walrus operator just adds another way to do it. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@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/OIOZTMFBSEBLA2P66BJTWH5MWRURE2EV/ Code of Conduct: http://python.org/psf/codeofconduct/