def hasattr(attr):
 def has_attr(value):
  return _hasattr(value, attr)
 return has_attr

def hasattr ( attr ) : def has_attr ( value ) : return _hasattr ( value , attr ) return has_attr
verifies that the object has an attribute with the given name .