Hash: SHA1
Hi Luca,
use type(something).__name__ , e.g.
True>>def x():
pass
class C:
pass
c = C()
type(x).__name__ == 'function'
True>type(C).__name__ == 'classobj'
True>type(c).__name__ == 'instance'
On Sep 1, 2008, at 10:43 AM, Luca wrote:
Hi all.-----BEGIN PGP SIGNATURE-----
I think this is a newbie question... what is the best method to know
if a property of an object is a function?
I'm thinking something as
if type(obj.methodName)==???
Can someone help me?
--
-- luca
--
http://mail.python.org/mailman/listinfo/python-list
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFIu606cZ70OCIgLecRAhE6AJ4r0GuHlWxXbLaYuolqpJ StYPD+ggCgidKg
qtgl+nbaKgH5AoelTu5WeJU=
=W4eG
-----END PGP SIGNATURE-----