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. -- Greg _______________________________________________ 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/3LQKF2Q2ZW7EJQH5PQ3EVCTTNHXRX2OM/ Code of Conduct: http://python.org/psf/codeofconduct/