bug with isinstance() ?

Mac idontneednostinkinid at yahoo.com
Wed Jun 1 18:19:24 EDT 2005


I see, interesting.  OK, I understand that recursive importing can be
problematic (having to "hide" the test2 import should have been a tip
off; it's just that in my original app this relationship is not as
clear), but what is the lesson I should take away from this?  I mean, I
was under the impression that "once a Foo, always a Foo", while from
the above I'm starting to see that a single class definition can give
rise to a multiple number of classes, and that the classes are
parametrized by the module they come from (I guess that makes sense...
else class names would have to be unique throughout all the source for
a single program)... I guess the problem is I'm thinking of "classes"
as these abstract concepts, sort of like Platonian "forms", whereas I
should be thinking of classes as "class objects", object instances,
each coming from some module's namespace...  is this sort of the idea?
Someone help me wrap my head around this, please. :)




More information about the Python-list mailing list