<div dir="ltr">tl;dr -- How should style guides evolve?<div><br></div><div>So this is a post inspired largely by a thread that popped up today [1], and specifically Alex's message [2]. I didn't want to derail that conversation (specifically dealing with style checking / correcting as a part of the standard library), but I did want to start a separate thread for an idea that's been rattling around in my brain for a while now. (Disclaimer, I am the current lead maintainer of the pep8 package, so part of this comes from my work there.)<div><br></div><div>Namely, how should style guides, and here I'm particularly looking at PEP-8, evolve?</div><div><br></div><div><div>I was influenced early on in my Python learning by a number of youtube Python conference talks. In particular "A Python Æsthetic: Beauty and Why I Python" by Brandon Rhodes [3] and "Transforming Code into Beautiful, Idiomatic Python" by Raymond Hettinger [4] had quite an impact on my thinking while I was moving from C / C++ to Python a couple of years back, and I highly recommend them.</div><div><br></div><div>Somewhat of an open question, I'm not sure I have a particularly hard and fast opinion on this issue, and I'd love to get feedback from the community. In particular, a couple of points that are worth mentioning:</div><div><br></div><div>* There are a number of checks that are disabled in pep8 by default, due to their being somewhat controversial for many users [5] which you can read about what each of them are for in the docs [6] if you're interested.</div><div><br></div><div>* Even within the checker community, there is some discussion about whether the tool should be rigidly set by the PEP-8 document (I tend to think it should be) and what that means for folks that don't want to follow a rule (I just disable it in my code) (see discussion about the use of ``isinstance()`` at [7]).</div><div><br></div><div>* There are several large code bases, the Python stdlib and Twisted for starters, that don't necessarily follow PEP-8 to the letter, due to pre-dating PEP-8 or being highly specialized, or etc, and proposals to bring them more in line have received pushback over their potential for more harm than good (see [8] for an example) (which is completely valid).</div><div><br></div><div>[1] <a href="https://mail.python.org/pipermail/python-ideas/2015-March/032545.html">https://mail.python.org/pipermail/python-ideas/2015-March/032545.html</a><br clear="all"><div><div class="gmail_signature">[2] <a href="https://mail.python.org/pipermail/python-ideas/2015-March/032556.html">https://mail.python.org/pipermail/python-ideas/2015-March/032556.html</a></div><div class="gmail_signature">[3] <a href="https://www.youtube.com/watch?v=x-kB2o8sd5c">https://www.youtube.com/watch?v=x-kB2o8sd5c</a></div><div class="gmail_signature">[4] <a href="https://www.youtube.com/watch?v=OSGv2VnC0go">https://www.youtube.com/watch?v=OSGv2VnC0go</a></div><div class="gmail_signature">[5] <a href="https://github.com/jcrocholl/pep8/blob/master/pep8.py#L68">https://github.com/jcrocholl/pep8/blob/master/pep8.py#L68</a></div><div class="gmail_signature">[6] <a href="http://pep8.readthedocs.org/en/latest/intro.html#error-codes">http://pep8.readthedocs.org/en/latest/intro.html#error-codes</a></div><div class="gmail_signature">[7] <a href="https://github.com/jcrocholl/pep8/pull/313">https://github.com/jcrocholl/pep8/pull/313</a></div><div class="gmail_signature">[8] <a href="http://bugs.python.org/issue23061#msg233065">http://bugs.python.org/issue23061#msg233065</a></div><div class="gmail_signature"><br>~ Ian Lee<br></div></div>
</div></div></div></div>