Steven D'Aprano wrote:
I don't think that stpa...@gmail.com means that the user literally assigns to locals() themselves. I read his proposal as having the compiler automatical mangle the names in some way, similar to name mangling inside classes.
Yes, but at some point you have to define a function to handle your string prefix. If it's at the module level then it's no problem, because you can do something like globals()["~f"] = lambda: ... But you can't do that for locals. So mangling to something unspellable would effectively preclude having string prefixes local to a function. -- 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/IHCCBYVDDRKC4KMKOJFQ3QFY2QWNPS7M/ Code of Conduct: http://python.org/psf/codeofconduct/