parameters: (path)
docstring: Convert *path* to a string or unicode path if possible.
docstring_summary: Convert *path* to a string or unicode path if possible.
docstring_tokens: Convert * path * to a string or unicode path if possible .
function: def _stringify_path(path):
      """
      Convert *path* to a string or unicode path if possible.
      """
      if isinstance(path, str):
          return path
  
      # checking whether path implements the filesystem protocol
      try:
          return path.__fspath__()
      except AttributeError:
          pass
  
      raise TypeError("not a path-like object")
function_tokens: def _stringify_path ( path ) : if isinstance ( path , str ) : return path # checking whether path implements the filesystem protocol try : return path . __fspath__ ( ) except AttributeError : pass raise TypeError ( "not a path-like object" )