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 7 (or guide) add C style policies and explanation #56397
Comments
In response to a discussion of a patch removing 'useless' post-increments, (which issue has apparently come up before)
A condensed version of the above added to PEP-7 would help new developers see the usage as local idiom rather than style bug. |
I'm not sure it's worth adding this to the PEP-7. The PEP is about conventions and style not idioms. |
Indeed, I don't think that's appropriate. Also, it's not about ++ in general but a particular use of it. |
But don't you think we should put information like this somewhere, even if it's not in PEP-7? We've had a discussion about this particular issue (idiomatic pointer increments when appending to a buffer) at least twice, and there's also the recent "if (const == variable)" issue that feels similar to me. It seems to me that recording these decisions somewhere has value, just so we don't have to revisit them. |
If these are recommandations, perhaps we should put them in the devguide But I agree that it's not worth doing it only for "*p++" anyway. |
We have a second item for the PEP (or Guide) section (but I think I prefer in the PEP so as to have one place to look for such things.). On 6/10/2011 3:49 PM, Guido van Rossum wrote:
[I understand this rationale too; I forget what I actually did when I was writing C.]
[I suspect I did this.]
I bet there will be more things for a new section. |
Hi, This discussion came to a stop, but it doesn't seem conclusive. PEP discussions are now in GitHub on https://github.com/python/peps/issues so I'm going to close this BPO issue. There is no additional section in PEP-7 for this level of detail, there is also no tooling in place (afaik) to retroactively apply or inspect these types of issues, so this would need to be discussed in the PEP issue, |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: