def bool_or_str(*text):
 def bool_or_value(obj):
  if (obj in text):
   return obj
  else:
   return asbool(obj)
 return bool_or_value

def bool_or_str ( * text ) : def bool_or_value ( obj ) : if ( obj in text ) : return obj else : return asbool ( obj ) return bool_or_value
return a callable that will evaluate a string as boolean .