-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Use overlapped signatures of _winapi functions #2723
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes regarding the overlapped
flag below.
@srittau I can provide an overload if overlapped is @overload
def ConnectNamedPipe(handle: int, overlapped: Literal[True, 1]) -> Overlapped: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Optional[Literal[False, 0]] = None) -> None: ...
@overload
def ConnectNamedPipe(handle: int, overlapped: Union[bool, int, None] = None) -> Optional[Overlapped]: ... but we aren't at the point where I can start using Literal types in typeshed, correct? |
Um, good point. I blame too much typeshed lately. Then we should just |
I realized I was wrong, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! A good case for literal types.
Indeed! Looking forward to being able to use them :) |
For python/mypy#6148.