mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)
This commit is contained in:
parent
10f715d712
commit
3ab9365dca
5 changed files with 22 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue