pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/typeshed/pull/16067/files

eet" href="https://github.githubassets.com/assets/github-cf976967feea1e66.css" /> Override `__int__` and `__index__` for `bool` in `builtins.pyi` by jonathandung · Pull Request #16067 · python/typeshed · GitHub
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,16 @@ class memoryview(Sequence[_I]):
class bool(int):
def __new__(cls, o: object = False, /) -> Self: ...

@overload
def __int__(self: Literal[True]) -> Literal[1]: ...
@overload
def __int__(self: Literal[False]) -> Literal[0]: ...

@overload
def __index__(self: Literal[True]) -> Literal[1]: ...
@overload
def __index__(self: Literal[False]) -> Literal[0]: ...

# The following overloads could be represented more elegantly with a TypeVar("_B", bool, int),
# however mypy has a bug regarding TypeVar constraints (https://github.com/python/mypy/issues/11880).
@overload
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy