On 10/25/21 11:50 AM, Erik Demaine wrote: > Here's another example where it matters whether the default expressions are computed within their own scope: > > ``` > def f(x := (y := 5)): > print(x) # 5 > print(y) # 5??? > f() > ```
That should definitely be a SyntaxError. -- ~Ethan~ _______________________________________________ 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/KO2C3TVTXCGOVRROI44VRZQAX4QRECTX/ Code of Conduct: http://python.org/psf/codeofconduct/