[Tutor] Is instance of what?

Tim Johnson tim at johnsons-web.com
Sat Jan 31 17:57:44 CET 2009


Using python 2.5.1
If I create a class a
class a:
	pass
initialize o as:
o=a
and call
isinstance(o,a)
the return value is True.
Is there a function that takes one
argument and returns the class?
Example:
class = whatclass(o)
>> "a"

Since I'm hoping the answer to this question will help me
answer some bigger questions, pointers to relevant docs
and discussions is invited.

FYI: preparing to migrate to python 3.0
thanks
tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090131/dd2e6c96/attachment.htm>


More information about the Tutor mailing list