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

MutableMapping.setdefault() is buggy, needs overload for one-argument case #1034

Closed
Akuli opened this issue Jan 17, 2022 · 2 comments
Closed

Comments

@Akuli
Copy link

Akuli commented Jan 17, 2022

I think https://github.com/python/typeshed/blob/61d876e4ea62c42599dbaa59471576d6eda0e04d/stdlib/typing.pyi#L480 is buggy. It needs an overload for the case where the second argument is not specified.

Originally posted by @JelleZijlstra in #1033 (reply in thread)

(Edit by Akuli: link to a specific commit instead of master)

@Akuli Akuli changed the title dict.setdefault() is buggy, needs overload for one-argument case MutableMapping.setdefault() is buggy, needs overload for one-argument case Jan 17, 2022
@JelleZijlstra
Copy link
Member

This is a typeshed issue. I opened python/typeshed#6941 to address it.

@Akuli
Copy link
Author

Akuli commented Jan 17, 2022

Lol, I forgot that the discussions aren't in typeshed :)

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

No branches or pull requests

2 participants