Michael Ekstrand wrote: > Something it could be useful to try to add, if possible: So far, it > seems that this create block can only create class-like things (objects > with a name, potentially bases, and a namespace). Is there a natural way > to extend this to other things, so that function creation can be > modified? For example: > > create tracer fib(x): > # Return appropriate data here > pass > > tracer could create a function that logs its entry and exit; behavior > could be modifiable at run time so that tracer can go away into oblivion. > > Given the current semantics of create, this wouldn't work. What would be > reasonable syntax and semantics to make something like this possible? > > Maybe this would need to be a separate PEP. But it seems at least > somewhat related.
I think this probably needs a separate PEP. Function definitions are really very different from class definitions. But feel free to write that PEP. ;) STeVe -- http://mail.python.org/mailman/listinfo/python-list