Re: newbee I have an object how to check what's his class?

2006-11-10 Thread consternation
('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

Re: newbee I have an object how to check what's his class?

2006-11-10 Thread consternation
I think I know now where my problems come from. I spare you boring implementation code. The case look like this: I parse xml file something a like X id=0 a1 \a a 2 \a X id=1 a3 \a b 4\b \X /X X id=2 a \a a \a X id=3 a \a b \b