"Steve Howell" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
|
| You would just change the language definition to say
| that once you enter f(), any call to f() from within
| f() behaves as if the recursively called f() still
| points to the originally bound version of f.

I am pretty sure such a context-dependent rule cannot be written as a 
context-free grammar rule.  In any case, the function object does not exist 
when code is being compiled to a code object.  So this requires 
implementation-dependent post-patching of the code object.  R. 
Hetchinger(sp?) posted a Cookbook recipe for doing this for CPython. 
Anyone wanting the speedup (with CPython) can use it.

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to