diff options
author | Brett Cannon <brettcannon@users.noreply.github.com> | 2018-04-30 18:31:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 18:31:45 (GMT) |
commit | 3ab9365dca8438f89b2060cd3eebe00606133dc4 (patch) | |
tree | 7844d510039f747edd6ed5cb2b1e60977c20a30a /Doc | |
parent | 10f715d71218ece737f990fa55027b8e1120cc3a (diff) | |
download | cpython-3ab9365dca8438f89b2060cd3eebe00606133dc4.zip cpython-3ab9365dca8438f89b2060cd3eebe00606133dc4.tar.gz cpython-3ab9365dca8438f89b2060cd3eebe00606133dc4.tar.bz2 |
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/importlib.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 130aabf..e33abae 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -530,7 +530,7 @@ ABC hierarchy:: .. abstractmethod:: contents() - Returns an :term:`iterator` of strings over the contents of + Returns an :term:`iterable` of strings over the contents of the package. Do note that it is not required that all names returned by the iterator be actual resources, e.g. it is acceptable to return names for which :meth:`is_resource` would @@ -544,7 +544,7 @@ ABC hierarchy:: the file system then those subdirectory names can be used directly. - The abstract method returns an iterator of no items. + The abstract method returns an iterable of no items. .. class:: ResourceLoader @@ -926,9 +926,9 @@ The following functions are available. .. function:: contents(package) - Return an iterator over the named items within the package. The iterator + Return an iterable over the named items within the package. The iterable returns :class:`str` resources (e.g. files) and non-resources - (e.g. directories). The iterator does not recurse into subdirectories. + (e.g. directories). The iterable does not recurse into subdirectories. *package* is either a name or a module object which conforms to the ``Package`` requirements. |