Skip to content
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

Convert 10 PEPs to reSt #180

Merged
merged 2 commits into from
Jan 19, 2017
Merged

Convert 10 PEPs to reSt #180

merged 2 commits into from
Jan 19, 2017

Conversation

Mariatta
Copy link
Member

PEP 212
PEP 216
PEP 219
PEP 228
PEP 235

PEP 269
PEP 288
PEP 312
PEP 315
PEP 3102

#4

PEP 212
PEP 216
PEP 219
PEP 228
PEP 235

PEP 269
PEP 288
PEP 312
PEP 315
PEP 3102
add indices() and irange() to built-ins[4]
add items() method to listobject[5]
- 'for i indexing a in l': exposing the for-loop counter [3]_
- add ``indices()`` and ``irange()`` to built-ins [4]_
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using ``...`` formatting consistently (or don't use it at all) CONSTANTs and function()s aren't the only things that can be wrapped by ``...``. If you change irange() to ``irange()``, I'd expect the following sentence to be formatted too:

This solution adds two built-in functions 'indices' and 'irange'.

I guess you have a script that converts these PEPs to reST format, but It would be nice to do some proofreading before sending a PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, @Mariatta has written a script to do the conversion.

Copy link
Member

Choose a reason for hiding this comment

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

While I think a moderate amount of proofreading and manual fix-up is warranted, I don't think the formatting needs to be perfect. We're mostly trying to improve the rendering of old historical documents, and if occasionally something isn't using a code font that is code, that's fine with me. Someone else can do some proofreading. The most important thing is that we don't accidentally break the meaning of a PEP.

@Mariatta Mariatta changed the title Convert 10 PEPs to reSt wip: Convert 10 PEPs to reSt Jan 15, 2017
@Mariatta Mariatta changed the title wip: Convert 10 PEPs to reSt Convert 10 PEPs to reSt Jan 19, 2017
@Mariatta
Copy link
Member Author

Thanks for the review, @berkerpeksag @brettcannon and @gvanrossum :)

I've gone through these again, and made these changes:

  • PEP 212:
    replace the single quotes (') with backticks (``) for:
    'range', 'zip', 'indices', 'irange'

    Fix typo: dicitionaries -> dictionaries

  • PEP 216:
    poplib module -> poplib module

  • PEP 228:
    math module -> math module
    cmath module -> cmath module

  • PEP 312:
    Inline "if" -> Inline if

    Add reference url to a python-dev discussion about PEP 308.

Please let me know if you notice anything else that needs adjustment.

@brettcannon brettcannon merged commit 87dc92a into python:master Jan 19, 2017
@brettcannon
Copy link
Member

Since you already address the backtick request from @berkerpeksag and I'm with Guido that as long as the content's meaning doesn't shift I'm not too worried about minor formatting, I'm merging this. Thanks @Mariatta !

@Mariatta
Copy link
Member Author

Thanks :)

@Mariatta Mariatta deleted the restify-peps branch January 19, 2017 18:04
@berkerpeksag
Copy link
Member

Here are some additional comments:

  • `something` is not a valid markup for making something italic. We have a rule for this in the linter we use for CPython documentation

  • In PEP 235, the paragraph starts with

    then if Python finds ``FiLe.py`` first [...]
    

    is part of the first item of the list.

  • docutils will convert the following bullet points to numbered ones:

    a. foo
    b. bar
    
    A. spam
    B. eggs
    

    will be rendered as:

    1. foo
    2. bar
    
    1. spam
    2. eggs
    

    This might look harmless most of the time, but for example, in PEP 235,
    the following sentences refer to them as #A and #B:

    #B is the same rule as is used on Unix, so this will improve cross-
    platform portability.
    

    and

    #A is needed to cater to case-destroying filesystems mounted on Windows,
    and *may* also be used by people so enamored of "natural" Windows
    behavior that they're willing to set an environment variable to
    get it.
    

    See https://www.python.org/dev/peps/pep-0235/#proposed-semantics

d558317 and e511fb5 should address some of these comments, but the last one still needs to be fixed.

@Mariatta
Copy link
Member Author

Sorry that I did not notice these mistakes before, and thanks for fixing them @berkerpeksag

but the last one still needs to be fixed.

Any suggestion on how to fix this?
My initial thought is to replace #A and #B with #1 and #2. But then the proceeding paragraph is making a reference to a different #2.

i.e.

The potential damage is here: #2 (matching on ALLCAPS.PY ) is proposed to be dropped.

@brettcannon
Copy link
Member

I don't think keeping the references for pointing to specific bullet points is critical. If you would use an explanatory shorthand that does the same thing, e.g. "The second rule is the same rule ..."

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.

5 participants