[New-bugs-announce] [issue33254] importlib.resources.contents() incorrectly yields an empty list

Brett Cannon report at bugs.python.org
Mon Apr 9 20:27:02 EDT 2018


New submission from Brett Cannon <brett at python.org>:

If you look at https://github.com/python/cpython/blob/0f914b5b5f6ba186afd7112fc851c97247076f70/Lib/importlib/resources.py#L247 you will notice that the generator for importlib.resources.contents() return an empty list. While the intent was to have no values be returned by contents(), by virtue of being a generator that empty list is actually being returned as a value.

----------
assignee: brett.cannon
components: Library (Lib)
messages: 315155
nosy: barry, brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: importlib.resources.contents() incorrectly yields an empty list
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33254>
_______________________________________


More information about the New-bugs-announce mailing list