"isinstance" question

John Nagle nagle at animats.com
Tue Jun 22 23:58:14 EDT 2010


On 6/22/2010 8:13 PM, Ben Finney wrote:
> John Nagle<nagle at animats.com>  writes:
>
>>    I want to test whether an object is an instance of any user-defined
>> class.  "isinstance" is less helpful than one would expect.
>
> Right. The type hierarchy is now unified; there's essentially no
> difference in later Python versions between user-defined types and
> built-in types.

     OK, now that I know that, there's no problem.

     I'n doing something that involves program analysis through
introspection.  More on this later.

				John Nagle



More information about the Python-list mailing list