diff options
author | Brett Cannon <brett@python.org> | 2012-06-15 23:21:07 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-06-15 23:21:07 (GMT) |
commit | 47b3239cc64958b516492a1227b43c6f0b3be65f (patch) | |
tree | 295a6963d8c3d9dbe857dd1af990aac6d9376a4a /Doc/library | |
parent | 24aa693c7ef8f217fbd238eb7af7d828e13a07eb (diff) | |
download | cpython-47b3239cc64958b516492a1227b43c6f0b3be65f.zip cpython-47b3239cc64958b516492a1227b43c6f0b3be65f.tar.gz cpython-47b3239cc64958b516492a1227b43c6f0b3be65f.tar.bz2 |
Closes issue #14982: Document that pkgutil's walk_packages() and
iter_modules() requires iter_modules() be defined on an importer. The
importers in importlib do not define this non-standard method.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/pkgutil.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index 3118ff2..0aee4e7 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -138,6 +138,10 @@ support. *prefix* is a string to output on the front of every module name on output. + .. note:: + Only works for importers which define a ``iter_modules()`` method, which + is non-standard but implemented by classes defined in this module. + .. function:: walk_packages(path=None, prefix='', onerror=None) @@ -166,6 +170,10 @@ support. # list all submodules of ctypes walk_packages(ctypes.__path__, ctypes.__name__ + '.') + .. note:: + Only works for importers which define a ``iter_modules()`` method, which + is non-standard but implemented by classes defined in this module. + .. function:: get_data(package, resource) |