def walk(root, depthfirst=False, error_handler=None):
    """Walk the directory tree starting from root, optionally ignoring
    access errors.

    :param root: anything accepted by :func:`dir`
    :param depthfirst: passed to :meth:`Dir.walk`
    :param error_handler: passed to :meth:`Dir.walk`
    :returns: as :meth:`Dir.walk`
    """
    return dir(root).walk(depthfirst=depthfirst, error_handler=error_handler)
