string to function reference
mwh21 at cam.ac.uk
Sat Sep 2 14:25:42 CEST 2000
igorr at ifi.uio.no (Igor V. Rafienko) writes:
> * Alex Martelli
> | The call operation needs to be applied to the function object. The
> | reference to the function object is in a dictionary, under a key you
> | have (the name you hold). What's so "waay to ugly" about fetching
> | the function object from that dictionary, then calling it?
> I was hoping there was already a built-in function that did that.
> Smth. like (symbol-function)
You're not missing symbol-function, you're missing find-symbol.
Python would be a lisp-1 if it were a lisp.
> (symbol-function "REDUCE")
*** - SYMBOL-FUNCTION: "REDUCE" is not a symbol
> (symbol-function (find-symbol "REDUCE"))
it's not that perl programmers are idiots, it's that the language
rewards idiotic behavior in a way that no other language or tool
has ever done -- Erik Naggum, comp.lang.lisp
More information about the Python-list