On Sat, May 30, 2020 at 04:41:58PM +1200, Greg Ewing wrote: > On 30/05/20 2:52 am, Dominik Vilsmeier wrote: > >Indeed locals are special, but why was it designed this way? Why not > >resolve such an unbound local name in the enclosing scopes? > > From experience with other languages I can attest that "sometimes > local, sometimes global depending on what gets executed first" > is a source of bugs. I like that Python always makes up its > mind about whether a given name is local or not.
+1 Out of curiosity, which languages are you thinking of? I know Lua does that, I can't think of any others. -- Steven _______________________________________________ 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/J7BDNRHRPITQQNNWM22EJYU2UD7LN6PI/ Code of Conduct: http://python.org/psf/codeofconduct/