InstanceType tests in Python-3.0

Robin Becker robin at NOSPAMreportlab.com
Thu Feb 14 17:39:19 EST 2008


Steven D'Aprano wrote:
> On Thu, 14 Feb 2008 17:21:20 +0000, Robin Becker wrote:
> 
>........
> 
> The way I see it, your code don't really care about the distinction 
> between "user-generated classes" and "built-in types", it cares about the 
> distinction between "classes I know about" and "other classes".
> 
> In fact, your existing code doesn't even catch all examples of user-
> generated classes. It (or at least the snippet you have posted) has no 
> branch catching new-style classes.
> 
......
in fact there are no old style classes in 3.0 any more. There appears to 
be a distinction between types and classes, but I'm not going to rely on 
that. Have to recode all of that polymorphic stuff :(
-- 
Robin Becker



More information about the Python-list mailing list