> if the .imag attribute exists: > do something > else > do something else > > How should this be written? if hasattr (object, 'imag'): do something else: do something else Alex.