def _query_super(func_name):
 def wrapped(self, *args, **kwargs):
  return getattr(self.clean(), func_name)(*args, **kwargs)
 return wrapped

def _query_super ( func_name ) : def wrapped ( self , * args , ** kwargs ) : return getattr ( self . clean ( ) , func_name ) ( * args , ** kwargs ) return wrapped
have the string class handle this with the cleaned string instead of ansistring .