summaryrefslogtreecommitdiff
path: root/Lib/importlib/abc.py
diff options
context:
space:
mode:
authorBrett Cannon <brettcannon@users.noreply.github.com>2018-04-30 11:31:45 -0700
committerGitHub <noreply@github.com>2018-04-30 11:31:45 -0700
commit3ab9365dca8438f89b2060cd3eebe00606133dc4 (patch)
tree7844d510039f747edd6ed5cb2b1e60977c20a30a /Lib/importlib/abc.py
parent10f715d71218ece737f990fa55027b8e1120cc3a (diff)
downloadcpython-git-3ab9365dca8438f89b2060cd3eebe00606133dc4.tar.gz
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)
Diffstat (limited to 'Lib/importlib/abc.py')
-rw-r--r--Lib/importlib/abc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index d2f45093a4..dbdd5bf641 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -381,8 +381,8 @@ class ResourceReader(metaclass=abc.ABCMeta):
@abc.abstractmethod
def contents(self):
- """Return an iterator of strings over the contents of the package."""
- return iter([])
+ """Return an iterable of strings over the contents of the package."""
+ return []
_register(ResourceReader, machinery.SourceFileLoader)