On Thu, Jun 18, 2020 at 09:30:30PM -0400, Jonathan Goble wrote:

> With that said, your proposal is unclear to me on whether this would force
> immutability on all code objects (and thereby prevent all bytecode
> modification), or whether it would have an opt-out (or opt-in) mechanism.

Code objects are already immutable.

py> def f(): pass
...
py> o = f.__code__
py> o.co_consts = (1,)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: readonly attribute


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

Reply via email to