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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/KO2C3TVTXCGOVRROI44VRZQAX4QRECTX/ Code of Conduct: http://python.org/psf/codeofconduct/
