#!/usr/local/bin/python2 class A(object): a = 1 class B(object): pass print hasattr(B, 'a')