Skip to content

Conversation

pzrq
Copy link
Contributor

@pzrq pzrq commented Jun 14, 2019

Fixed Typos

Link
"Similarly, there is no support for specifying callback signatures with a variable number of argument of a specific type."
Changed to:
arguments

Link
"I/O releated types:"
Changed to:
related

Replaced IOW -> In other words

Link

"... that's a subtype of C, not a special form. IOW, in the above example calling e.g. new_user(Union[BasicUser, ProUser]) is ..."
Changed to:
In other words

Reasoning

I'm reasonably sure IOW is intended to mean In other words (i.e. UrbanDictionary:IOW instead of one of Wikipedia:IOW) in this context, so have optimistically suggested this replacement.

See PEP 20: Explicit is better than implicit.

Applied PEP 8: Inline comments

(Note this occurred in many places, please review the diff or individual commits for details)
e.g.

        class AlsoBad:
-           x = None # type: List[T] # Also an error
+           x = None  # type: List[T] # Also an error
                     ^

Reasoning

  # type: ignore # <comment or other marker>

@Mariatta @johnsonb2 Thank you for the inspiration in #914

pzrq added 4 commits June 13, 2019 23:52
Also, as noted in the 'Type comments' section, type comments should be at the start, and can then be followed by a comment, separated with a single space, e.g.
  # type: ignore # <comment or other marker>

Reference:
https://www.python.org/dev/peps/pep-0008/#inline-comments
Applying PEP 20, explicit is better than implicit.
Copy link
Member

@Mariatta Mariatta left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I think the typo fixes, like "in other words" and "repeated" are good improvements to the PEP, but not sure about the whitespace changes just for the sake of PEP 8. I'll leave it to PEP authors to decide and merge.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Thanks! I approve of the changes, including the whitespace changes. (Technically, PEP 8 doesn't endorse lining up comments, but I think it looks better here. :-)

@gvanrossum gvanrossum merged commit 6e970b9 into python:master Jun 14, 2019
@pzrq pzrq deleted the pep484-proofread branch June 14, 2019 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants