Steven D'Aprano wrote:
I don't think that [email protected] 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 -- [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/IHCCBYVDDRKC4KMKOJFQ3QFY2QWNPS7M/ Code of Conduct: http://python.org/psf/codeofconduct/
