This doesn't answer your whole post because it asked a lot of questions. But as to finding out whether something is an instance of a class:
class X(object): # ... defined as in your post >>> x = X('Fred') >>> x class X contains: >>> type(x) is X True >>> isinstance(x,X) True >>> x.__class__.__name__ 'X' Now for subclasses: class Y(X): extrastuffinY = 1 >>> y = Y('Joe') >>> type(y) is X False >>> isinstance(y,X) True consternation: > I can't find neither in tutorial nor with google It's all about > isinstance, or __class__. > How to test that an object is an instance of my X class?? -- http://mail.python.org/mailman/listinfo/python-list