How to print a variable from a derived class? <p>I know there are similar questions on this topics but none of them seem to apply to my case Why would the following code print None and not True? Thanks</p> <pre><code>class A(object): flag = None @classmethod def set_flag(cls): cls.flag = True class B(A): @classmethod def print_super_flag(cls): print cls.__bases__[0].flag # This prints None print super(B, cls).flag # This also if __name__ == "__main__": b = B() b.set_flag() b.print_super_flag() </code></pre>