Inada Naoki <songofaca...@gmail.com> added the comment:

> Could someone create a buffer object which still allows the underlying memory 
> to be written?  Sure.  But I can use ctypes to modify byte code today as well 
> with something like "ctypes.cast(id(f.__code__.co_code) + 32, 
> ctypes.POINTER(ctypes.c_char)) [0] = 101" 

You are comparing apple and orange.
Breanking memory inside immutable object by ctypes is far different from 
mutating mutable memory.

It introduce more weakness and complexity into code object.

At least, you need to demonstrate the benefit.

When importing module, there are many objects are created.  Why avoiding decref 
only for co_code make much difference?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to