def state_str(state):
 if (state is None):
  return 'None'
 else:
  return ('<%s at 0x%x>' % (state.class_.__name__, id(state.obj())))

def state_str ( state ) : if ( state is None ) : return 'None' else : return ( '<%s at 0x%x>' % ( state . class_ . __name__ , id ( state . obj ( ) ) ) )
return a string describing an instance via its instancestate .