parameters: (filename, mode='rb')
docstring: Returns a file descriptor for the filename if that file exists,
      otherwise `None`.
docstring_summary: Returns a file descriptor for the filename if that file exists,
      otherwise `None`.
docstring_tokens: Returns a file descriptor for the filename if that file exists otherwise None .
function: def open_if_exists(filename, mode='rb'):
      """Returns a file descriptor for the filename if that file exists,
      otherwise `None`.
      """
      try:
          return open(filename, mode)
      except IOError as e:
          if e.errno not in (errno.ENOENT, errno.EISDIR, errno.EINVAL):
              raise
function_tokens: def open_if_exists ( filename , mode = 'rb' ) : try : return open ( filename , mode ) except IOError as e : if e . errno not in ( errno . ENOENT , errno . EISDIR , errno . EINVAL ) : raise