On Wed, Sep 13, 2017 at 12:24:31PM +0900, INADA Naoki wrote:
> I'm worring about performance much.
> 
> Dict has ma_version from Python 3.6 to be used for future optimization
> including global caching.
> Adding more abstraction layer may make it difficult.

Can we make it opt-in, by replacing the module __dict__ when and only if 
needed? Perhaps we could replace it on the fly with a dict subclass that 
defines __missing__? That's virtually the same as __getattr__.

Then modules which haven't replaced their __dict__ would not see any 
slow down at all.

Does any of this make sense, or am I talking nonsense on stilts?




-- 
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to