def _unquote_or_none(s):
 if (s is None):
  return s
 return escape.url_unescape(s, encoding=None, plus=False)

def _unquote_or_none ( s ) : if ( s is None ) : return s return escape . url_unescape ( s , encoding = None , plus = False )
none-safe wrapper around url_unescape to handle unamteched optional groups correctly .