<div dir="ltr">Coincidentally, I changed this in flake8's pep8-naming plugin about a month ago[1], although the change has not yet made it into a release.<div><br></div><div>[1]: <a href="https://github.com/PyCQA/pep8-naming/pull/47">https://github.com/PyCQA/pep8-naming/pull/47</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 29, 2018 at 11:53 AM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think it should be `cls` and flake8 etc. should be fixed.<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Jan 29, 2018 at 11:34 AM, Pim Schellart <span dir="ltr"><<a href="mailto:p.schellart@princeton.edu" target="_blank">p.schellart@princeton.edu</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Dear Python developers,<br>
<br>
PEP 8 says:<br>
<br>
"Always use self for the first argument to instance methods.<br>
<br>
Always use cls for the first argument to class methods.”<br>
<br>
But what about metaclasses?<br>
PEP 3115 seems to suggest `cls`, and so do many Python books, however tools such as flake8 don’t seem to like it.<br>
Is there a consensus opinion, and should PEP 8 be updated?<br>
<br>
Kind regards,<br>
<br>
Pim Schellart<br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-dev</a><br></span>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/options/python-dev/guido%40p<wbr>ython.org</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_249679542786475849m_5852610238233447862gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/jon%40indelible.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>jon%40indelible.org</a><br>
<br></blockquote></div><br></div>