other ways to check for ?

2006-11-02 Thread elderic
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

Re: other ways to check for ?

2006-11-02 Thread elderic
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

Re: other ways to check for ?

2006-11-02 Thread elderic
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

Re: other ways to check for ?

2006-11-02 Thread elderic
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