code: def quote_plus(string, safe='', encoding=None, errors=None):
      
      # Check if ' ' in string, where string may either be a str or bytes.  If
      # there are no spaces, the regular quote will produce the right answer.
      if ((isinstance(string, str) and ' ' not in string) or
          (isinstance(string, bytes) and b' ' not in string)):
          return quote(string, safe, encoding, errors)
      if isinstance(safe, str):
          space = str(' ')
      else:
          space = bytes(b' ')
      string = quote(string, safe + space, encoding, errors)
      return string.replace(' ', '+')
docs: Like quote(), but also replace ' ' with '+', as required for quoting
      HTML form values. Plus signs in the original string are escaped unless
      they are included in safe. It also does not have safe default to '/'.