Skip to content

bpo-36144: Simplify defaultdict.__or__ #18931

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

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Conversation

brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Mar 11, 2020

Just something I noticed after #18729 was merged.

https://bugs.python.org/issue36144

@brandtbucher
Copy link
Member Author

Closing and reopening since Azure is stalled.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Heh, clever. This guarantees that no errors will happen. I think it means that it ignores __instancecheck__. Do you think that's okay? I don't see a great problem with it but want to make sure you've thought about it.

@brandtbucher
Copy link
Member Author

Yeah. I don’t think it’s an issue, since defaultdict doesn’t define __instancecheck__.

@gvanrossum
Copy link
Member

Okay. A subclass could. But I agree it's extremely unlikely. So I'll approve and merge.

@gvanrossum gvanrossum merged commit 1dd3794 into python:master Mar 12, 2020
@bedevere-bot
Copy link

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

@brandtbucher brandtbucher deleted the patch-1 branch July 21, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants