-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PEP 0007: Only use C++ style // one-line comments #2072
PEP 0007: Only use C++ style // one-line comments #2072
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
I did sign the CLA - minutes before creating the PR. |
There is a human review step to the CLA process, so it will take some time before @the-knights-who-say-ni recognizes that you have signed. As far as the content of the PR, I think you may be mistaking the point of that line: it is not saying that only C++-style one-line comments should be used, but that such comments should not be used in versions of Python before 3.6. There is no prohibition against single-line multi-line-style comments. |
Ah right, got it. I'm not a native speaker, but I think the text can be interpreted both ways:
Of course, the first interpretation is the most straightforward and obvious, and the second one is convoluted. Still, to accommodate non-native speakers, I would recommend changing to something like this: Much easier to understand, at least for me. |
Since Python 3.6 is now the oldest version still supported, perhaps it can be worded more positively, as a permission rather than a version-specific prohibition? "As of Python 3.6, C++ style // one-line comments may be used freely." |
I'm of the mind that since 3.5 is EOL'd we can just remove the Python version qualifier. |
If so, this sentence can be removed altogether 😄 |
Or something like this, whatever you prefer. Is there a preferred style for longer comments, by the way? Why refer to one-line comments? But again, perhaps this sentence should be removed if Python 3.5 is EOL'd. Actually, I have found 3 occurrences of references to versions of Python < 3.6, the last one being the worst offender!
|
I'm not really interested in this discussion, except to confirm that the OP misunderstood the intention, and the PR as it stands should not be accepted. |
I would be interested to know why you think I misunderstood the intention. Is it because I am not a native speaker, or because the wording truly is ambiguous? |
It may very well be ambiguous; I'm having a hard time seeing it that way, but I'm also more familiar with the history here. I would support removing the |
It may very well be ambiguous, but I believe Guido's point is that this particular PR shouldn't be accepted. Feel free to open a separate PR changing the wording of that comment. |
PEP 0007 itself states:
Therefore switch to C++ style // one-line comments.