code: def _shortcut_open(
          uri,
          mode,
          ignore_ext=False,
          buffering=-1,
          encoding=None,
          errors=None,
          ):
      
      if not isinstance(uri, six.string_types):
          return None
  
      parsed_uri = _parse_uri(uri)
      if parsed_uri.scheme != 'file':
          return None
  
      _, extension = P.splitext(parsed_uri.uri_path)
      if extension in _COMPRESSOR_REGISTRY and not ignore_ext:
          return None
  
      open_kwargs = {}
  
      if encoding is not None:
          open_kwargs['encoding'] = encoding
          mode = mode.replace('b', '')
  
      #
      # binary mode of the builtin/stdlib open function doesn't take an errors argument
      #
      if errors and 'b' not in mode:
          open_kwargs['errors'] = errors
  
      #
      # Under Py3, the built-in open accepts kwargs, and it's OK to use that.
      # Under Py2, the built-in open _doesn't_ accept kwargs, but we still use it
      # whenever possible (see issue #207).  If we're under Py2 and have to use
      # kwargs, then we have no option other to use io.open.
      #
      if six.PY3:
          return _builtin_open(parsed_uri.uri_path, mode, buffering=buffering, **open_kwargs)
      elif not open_kwargs:
          return _builtin_open(parsed_uri.uri_path, mode, buffering=buffering)
      return io.open(parsed_uri.uri_path, mode, buffering=buffering, **open_kwargs)
docs: Try to open the URI using the standard library io.open function.
  
      This can be much faster than the alternative of opening in binary mode and
      then decoding.
  
      This is only possible under the following conditions:
  
          1. Opening a local file
          2. Ignore extension is set to True
  
      If it is not possible to use the built-in open for the specified URI, returns None.
  
      :param str uri: A string indicating what to open.
      :param str mode: The mode to pass to the open function.
      :param dict kw:
      :returns: The opened file
      :rtype: file