>>> class A(object): ... foo = 1 ... >>> class B(A): ... pass ... >>> b = B() >>> hasattr(b, 'foo') True >>> 'foo' in b.__dict__ False