[Python-ideas] Make Python code read-only

Eric Snow ericsnowcurrently at gmail.com
Wed May 21 08:26:03 CEST 2014


On Tue, May 20, 2014 at 10:57 AM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> Issues with read-only code
> ==========================

Other things to consider:

* reload() will no longer work (it loads into the existing module ns)
* the module-replaces-self-in-sys-modules hack will be weird
* class decorators that modify the class will no longer work
* caching class attrs that are lazily set by instances will no longer
work (similar to modules)
* singletons stored on the class will break

-eric


More information about the Python-ideas mailing list