[Python-Dev] 2.5 and beyond

Tim Peters tim.peters at gmail.com
Sat Jul 1 09:28:35 CEST 2006


[Tim Peters]
>> Note that this is quite unlike Scheme, in which declaration must
>> appear before use (ignoring fancy letrec cases),

[Greg Ewing]
> I think that's overstating things a bit --

So do I :-), but I don't really care about Scheme here.

> mutually recursive functions are quite easy to write in
> Scheme and don't look at all "fancy" (unless you object for
> some reason to using (define ...)).

In this context, yes, I object to using "define", because the
semantics of internal definitions are defined in terms of an
equivalent (letrec ...) form.  The "fancy" gimmick is that letrec
views all its bindings as occurring simultaneously, so strains a
natural, linear understanding of "no use before declaration".

But none of this appears to have any relevance to Python, so I'm
happiest _here_ just calling that "fancy" and ignoring the details.
Ditto "top level" definitions, which have unique rules of their own.


More information about the Python-Dev mailing list