Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/brettcannon'closed_at=<Date2018-04-30.19:44:12.799>created_at=<Date2018-04-10.00:27:02.060>labels= ['3.7', '3.8', 'type-bug', 'library']
title='Have importlib.resources.contents() return an interable instead of an iterator'updated_at=<Date2018-04-30.19:44:12.799>user='https://github.com/brettcannon'
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.
I had to stare at it for a while since I knew it was for namespace packages and I'm so used to them returning a magical value to signal that fact, but then realize we don't even support namespace packages so it wasn't magical at all. ;)
And yes, I'll do a PR and make you a reviewer probably this Friday.
brettcannon
changed the title
importlib.resources.contents() incorrectly yields an empty list
Have importlib.resources.contents() return an interable instead of an iterator
Apr 20, 2018
New changeset 3ab9365 by Brett Cannon in branch 'master': bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467) 3ab9365
New changeset 2e5fa38 by Miss Islington (bot) in branch '3.7': bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467) 2e5fa38
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: