Python syntax in Lisp and Scheme
Jacek Generowicz
jacek.generowicz at cern.ch
Wed Oct 15 12:14:57 EDT 2003
David Eppstein <eppstein at ics.uci.edu> writes:
> To clarify, by "unlike lisp" I meant only that defun doesn't nest
... and now you'll have to clarify what you mean by "defun doesn't
nest" ...
> of course you could use flet, or bind a variable to a lambda, or
> whatever.
Yes, you use flet (or labels) if you want a local function definition,
and defun if you want a global one. Lisp caters for both
possibilities. Does Python ?
(And by "cater" I do _not_ mean
def foo(...):
...
globals()['foo'] = foo
Now, if Python had macros ...
)
More information about the Python-list
mailing list