On Aug 29, 2019, at 16:58, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> 
> 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: ...

What happens if you do this, and then include "~f" in __all__, and then import 
* from that module?

I personally would rather have my prefixes or suffixes available in every 
module that imports them, without needing to manually register them each time. 
Not a huge deal, and if nobody else agrees, fine. But if I could __all__ it, I 
could get what I want anyway. :)

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

Reply via email to