Skip to content

Commit

Permalink
[merge from 3.5] Issue28438 - Fix the link for pkgutil.get_data doc.
Browse files Browse the repository at this point in the history
Patch contributed by Xiang Zhang.
  • Loading branch information
orsenthil committed Oct 14, 2016
2 parents 7b16652 + 1cea56b commit c972d1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Doc/library/pkgutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ support.

Get a resource from a package.

This is a wrapper for the :term:`loader` :func:`get_data` API. The
This is a wrapper for the :term:`loader`
:meth:`get_data <importlib.abc.ResourceLoader.get_data>` API. The
*package* argument should be the name of a package, in standard module format
(``foo.bar``). The *resource* argument should be in the form of a relative
filename, using ``/`` as the path separator. The parent directory name
Expand All @@ -222,4 +223,5 @@ support.
data = open(os.path.join(d, resource), 'rb').read()

If the package cannot be located or loaded, or it uses a :term:`loader`
which does not support :func:`get_data`, then ``None`` is returned.
which does not support :meth:`get_data <importlib.abc.ResourceLoader.get_data>`,
then ``None`` is returned.

0 comments on commit c972d1c

Please sign in to comment.