Title: Misc/ does not reflect PEP 7
Type: behavior Stage:
Components: Demos and Tools Versions: Python 3.1, Python 3.2, Python 3.3, Python 2.7, Python 2.6, Python 2.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Mick.Beaver, georg.brandl
Priority: normal Keywords:

Created on 2010-11-19 14:52 by Mick.Beaver, last changed 2010-11-20 14:09 by georg.brandl. This issue is now closed.

Messages (4)
msg121526 - (view) Author: Mick Beaver (Mick.Beaver) Date: 2010-11-19 14:52

I noticed that the in Misc seems very different from PEP 7. Would it be possible to have one that produces C code that meets the PEP 7 style guidelines?

As always, thanks for all of the hard work for Python!

msg121617 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 11:47
Done in r86561.  Thanks for the report!
msg121646 - (view) Author: Mick Beaver (Mick.Beaver) Date: 2010-11-20 14:00

Thanks for looking at this. Before getting your response, I decided to
take a crack at it and came up with something different. We explicitly
disagree on:

1. You had --no-blank-lines-after-declarations, but PEP 7 says:
- Function definition style: function name in column 1, outermost
      curly braces in column 1, blank line after local variable

2. You had --cuddle-else, but PEP 7 has the following listing:
if (mro != NULL) {
else {

I merged our two files. Between the two of us, we had a
number of switches that were inferred, and should probably be made
more explicit in PEP 7. Those are:

How do you feel about the following

-T PyCFunction
-T PyObject

Thanks for your help,
msg121649 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-20 14:09
ad 1: yes, that makes sense.

ad 2: "cuddling" and "non-cuddling" else are actually pretty evenly mixed in the source.  I didn't explicitly look at PEP 7 for this, but in that case it should get preference.

Your suggested profile looked good, applied in r86564.
Date User Action Args
2010-11-20 14:09:19georg.brandlsetmessages: + msg121649
2010-11-20 14:00:46Mick.Beaversetmessages: + msg121646
2010-11-20 11:47:37georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg121617

resolution: fixed
2010-11-19 14:52:46Mick.Beavercreate