Skip to content

Fix incorrectly Optional builtin function args #500

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
Aug 26, 2016

Conversation

ddfisher
Copy link
Contributor

Many builtin functions were accidentally marked as Optional because
they were given default values of None.

Many builtin functions were accidentally marked as Optional because
they were given default values of None.
@@ -608,7 +608,7 @@ class range(Sequence[int]):
@overload
def __init__(self, start: int, stop: int, step: int = 1) -> None: ...
def count(self, value: int) -> int: ...
def index(self, value: int, start: int = 0, stop: int = None) -> int: ...
def index(self, value: int) -> int: ...
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one change that isn't only making something non-Optional. In trying to test the third argument of range.index, I found that the function only takes one argument (in spite of help(range) suggesting otherwise).

@gnprice gnprice merged commit e8df136 into master Aug 26, 2016
@gvanrossum gvanrossum deleted the fix-builtin-accidential-optional branch September 1, 2016 01:53
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

Successfully merging this pull request may close these issues.

2 participants