[Python-ideas] Make Python code read-only
Ethan Furman
ethan at stoneleaf.us
Tue May 20 23:21:35 CEST 2014
On 05/20/2014 01:32 PM, Victor Stinner wrote:
> 2014-05-20 19:37 GMT+02:00 Chris Angelico <rosuav at gmail.com>:
>>> * The sys module cannot be made read-only because modifying sys.stdout
>>> and sys.ps1 is a common use case.
>>
>> I think this highlights the biggest concern with defaulting to
>> read-only.
>
> Hum, maybe my email was unclear: the read-only mode is disabled by default.
Ah, that's good.
> Another option is to have a list of modules which should be made
> read-only, configurable by the application.
Or a list of modules that should remain read/write. As an application dev I should know which modules I am going to be
modifying after initial load, so as long as I can easily add them to a read/write list I would be happy (especially when
it came time to debug something).
--
~Ethan~
More information about the Python-ideas
mailing list