In Common Lisp there is a function for everything :-)
Actually, I recently had need for the various type? functions in
Scheme, like int?, string? etc. Right now the only way to do this
is:
if type(obj) == type(1):
...
Which seems inefficient.
>Is it possible to define an Python function?
It would be easy to write a function like that in C. Just do a lookup,
and if an error was returned, cancel it and return 0.
Steve
-- Steven Miale - smiale@cs.indiana.edu | Don't blame me - Indiana University, Bloomington, IN | I voted Libertarian.