python check namespace has instance code example Example: python check namespace has instance if hasattr(a, 'property'): a.property