10000 Remove tuple's __init__ method by msullivan · Pull Request #2467 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Remove tuple's __init__ method #2467

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 2 commits into from
Sep 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Remove tuple's __init__ method
The __new__ method should suffice, and having both interferes with providing
a __new__ in namedtuples, which we want to do to fix
python/mypy#1279.
  • Loading branch information
msullivan committed Sep 19, 2018
commit 722b23d512e2f494cd8e90c76229e6535a707a05
1 change: 0 additions & 1 deletion stdlib/2/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ class slice(object):

class tuple(Sequence[_T_co], Generic[_T_co]):
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
def __len__(self) -> int: ...
def __contains__(self, x: object) -> bool: ...
@overload
Expand Down
1 change: 0 additions & 1 deletion stdlib/3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ class slice:

class tuple(Sequence[_T_co], Generic[_T_co]):
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
def __len__(self) -> int: ...
def __contains__(self, x: object) -> bool: ...
@overload
Expand Down
0