Re: boundp() for Python?

Steven Miale (smiale@cs.indiana.edu)
Mon, 25 Apr 1994 16:02:39 -0500

In article <Co7w98.1FJ@gremlin.nrtc.northrop.com>,
Jeff P. Lankford <jpl@nrtc.northrop.com> wrote:
>In Lisp, there is a function (boundp) that returns T if ther
>symbol passed as an argument is bound,

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.