Hi there,
are there other ways than the ones below to check for
in a python script?
(partly inspired by wrapping Tkinter :P)
def f():
print "This is f(). Godspeed!"
1.: --> sort of clumsy and discouraged by the docs as far as I read
import types
type(f) is types.FunctionType
2.: --> I don't
Thx =)
Fredrik Lundh schrieb:
> elderic wrote:
>
> > are there other ways than the ones below to check for
> > in a python script?
>
> callable(f)
>
>
--
http://mail.python.org/mailman/listinfo/python-list
e: type(f) is function
quite similar to: type(x) is int
Didn't intent to be a Documentation-Nazi *G*
-elderic
Excuse my large paste from the Python 2.5 Documentation:
---
5.15 types -- Names for built-in t
ing the creation of Tk-Buttons, etc.
They need a callback and in my process to learn I wanted to know about
the
possible options to test for that.
peace of mind. =)
elderic
--
http://mail.python.org/mailman/listinfo/python-list