[Tutor] Function type?

Zak Arntson zak@harlekin-maus.com
Tue Jun 10 14:36:03 2003


Okay, so I can use isinstance as follows:

>>> isinstance('a', str)
1
>>> isinstance(23, int)
1

But what's the shortcut keyword for a function type? Right now, I have to
use a dummy function:

>>> def a(): pass
>>> def squared(x): print x**2
>>> isinstance(b, type(a))
1

Is there a keyword I'm being oblivious to? Or do I need to resort to this
dummy function thing?

Thanks, all

-- 
Zak Arntson
www.harlekin-maus.com - Games - Lots of 'em