[Tutor] Function type?

Michael Janssen Janssen@rz.uni-frankfurt.de
Tue Jun 10 15:00:02 2003


On Tue, 10 Jun 2003, Zak Arntson wrote:

> 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
...
> Is there a keyword I'm being oblivious to? Or do I need to resort to this
> dummy function thing?

the types-modul has definitions for any (standart) kind of type:

>>> def f(): pass
...
>>> import types
>>> isinstance(f, types.FunctionType)
1

Michael

>
> Thanks, all
>
> --
> Zak Arntson
> www.harlekin-maus.com - Games - Lots of 'em
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>