[Python-Dev] defmacro (was: Anonymous blocks)

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 27 02:18:06 CEST 2005


Jim Jewett wrote:

> I had been thinking that the typical use would be during function (or
> class) definition.  The overhead would be similar to that of decorators,
> and confined mostly to module loading.

But that's too late, unless you want to resort to bytecode
hacking. By the time the module is loaded, its source code
has long since been compiled into code objects.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list