Skip to content

dict.pop() should return a union type when parameter default is specified #614

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

Closed
rkr-at-dbx opened this issue Oct 17, 2016 · 1 comment
Closed

Comments

@rkr-at-dbx
Copy link
Contributor

rkr-at-dbx commented Oct 17, 2016

Something along the lines of

@overload
def pop(self, k: _KT) -> _VT: ...
@overload
def pop(self, k: _KT, default: _T = ...) -> Union[_T, _VT]: ...
@gvanrossum
Copy link
Member

Thanks, this is a duplicate of #278.

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