Nick Coghlan <ncoghlan <at> gmail.com> writes:
> 
> I thought of that question as well, but the later exchange between Guido
> and Brett made me realise that a lot more than the top level module code
> object is affected here - the adjustment also needs to be propagated to
> the code objects created by the module for functions and generators and
> so forth.

I'm not sure I understand. There's a single type of "code object" and it's
PyCodeObject. Making the attribute writable (from Python code) at that level
should be sufficient.
(then of course the recursive machinery needed to mutate all code objects
created in a module may be slightly inefficient if written in Python, but at
least it's possible to write it)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to