By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,706 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,706 IT Pros & Developers. It's quick & easy.

Find class of an instance?

P: n/a
Sounds simple, but how, given an instance, do I find the class?

Aug 6 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Neal Becker <nd*******@gmail.comwrites:
Sounds simple, but how, given an instance, do I find the class?

It does not only sound simple. When 'inst' is your instance, then

inst.__class__

or

type(inst)

is the class.

Best,
-Nikolaus

--
»It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that.«
-J.H. Hardy

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
Aug 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.