-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Clarify Ellipsis usage in the docs (#683) #1631
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
|
I recommend removing the mention of Ellipsis; |
|
@gvanrossum your feedback slightly contradicts the open issue #683. So, I removed the comment about it being an option, but left the link to Ellipsis itself. |
|
I was expecting somebody to point to a section of the docs where it would make sense to add the explanation for the other use case. That is...
I can make an attempt in docs/type_inference_and_annotations.txt |
|
The point here is to show clearly what one should write, not to be the
definitive reference. For that we have the PEP. Links to the formal
definitions of pass and Ellipsis feel out of place.
Sorry, maybe Jukka can be the final arbiter.
…--Guido (mobile)
|
|
That makes more sense to me, now. I've adjusted accordingly. I can squash whenever necessary. |
| class B(A): | ||
| def foo(self, x: int) -> None: ... | ||
| def bar(self -> str: | ||
| def bar(self) -> str: |
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.
Thanks for this fix!


Minor clarification and addition of links to the docs, just to close #683.
#683 could have probably been closed before this PR, but if somebody had a different idea of where this should go in the docs, I could modify this PR.
As rendered:
http://imgur.com/a/FSTpP