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
AandB? Because what you are doing is creating a new classTmpClassthat inherits from eitherAorB.