On 30/05/20 12:11 am, Steven D'Aprano wrote:
I said that the storage mechanism of *how* local variables are stored, and hence whether or not writes to `locals()` are reflected in the local variables, is an implementation detail.
That's true, but just to be clear, my ?= idea doesn't rely on that implementation detail. If locals were kept in a dict, for example, it could work by testing whether the name has an entry in the dict. This also means that it *could* be made to work in class and global scopes if it were so desired. -- 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/UOULR7226EHBILL3Z7LQSB5E36LIAQF5/ Code of Conduct: http://python.org/psf/codeofconduct/