Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support anything with .keys() and __getitem__ in dict.__init__ #4470

Merged
merged 6 commits into from
Aug 24, 2020

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Aug 20, 2020

Fixes #4409

Should SupportsKeysAndGetItem inherit from Container or not? SupportsGetItem inherits from Container but SupportsItems doesn't.

keys() returns Iterable instead of AbstractSet to support e.g. tkinter widgets that return their keys as a list.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit c065982 into python:master Aug 24, 2020
@Akuli Akuli deleted the dict-keys-getitem branch August 24, 2020 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dict() should support anything with .keys() and __getitem__
2 participants