Why is Python popular, while Lisp and Scheme aren't?

Aahz aahz at pythoncraft.com
Sat Nov 16 17:30:48 EST 2002


In article <ar6950$1tn$1 at wheel2.two14.net>,  <maney at pobox.com> wrote:
>
>But it might avoid that if it were def'd as a nested function, if I've
>got that straight?  I'm not sure I grok that in fullness - does the
>nested def get recompiled on every call to the containing function, or
>is it compiled once and then skipped?  Come to think of it, at least
>some bits must be processed per call-of-containing or else some of the
>recipies that bind to default args of the nested function wouldn't
>work.  I think.  Pending further study of this small, simple language. 
><grin>

Nested functions are definitely parsed only once, creating a code object
with bytecodes.  However, the function object is recreated each time the
enclosing function is executed.  I'm not sure exactly what other steps
are taken.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?



More information about the Python-list mailing list