Re-executing the code object from a class 'declaration'

Michele Simionato michele.simionato at gmail.com
Wed Oct 6 02:33:01 EDT 2004


Carlos Ribeiro <carribeiro at gmail.com> wrote in message news:<mailman.4404.1097028568.5135.python-list at python.org>...
> As part of a pet project of mine, I needed to find a way to re-execute
> a class declaration[1]. 

You may want to read this old thread:

http://groups.google.com/groups?hl=en&lr=&threadm=2259b0e2.0303171358.5a6fe337%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26q%3DPEP%2B308%2Bblack%2Bmagic%26btnG%3DSearch%26meta%3Dgroup%253Dcomp.lang.python.*

which does something close to what you ask for. Of course the trick
there is NOT recommended for real code ;)

          Michele Simionato



More information about the Python-list mailing list