I have this python code which set A or B in a class. I want to print what this class receives:
if options.A:
print "setting A"
class TmpClass(A): pass
else:
print "nothing set in the command line => setting to B"
class TmpClass(B): pass
print "selected=",TmpClass
I want to see either A or B in the output but I see:
selected= TmpClass
What your code is doing, translated in English is:
Now, if what the code is actually doing is indeed what you intended, my guess is that what you wanted could be to know whether your class is A or B -based… If I am right, then the line you want to have at the end is:
HTH!