Alex Walters tritium-list at sdamon.com
Fri Jan 4 23:04:07 EST 2019

> -----Original Message-----
> From: Python-ideas <python-ideas-bounces+tritium-
> list=sdamon.com at python.org> On Behalf Of Abe Dillon
> Sent: Friday, January 4, 2019 2:02 PM
> To: Python-Ideas <python-ideas at python.org>
> Subject: [Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS
> I keep coming back to this great video <https://vimeo.com/74316116>  about
> coding style, and one point in particular rings true to me:

Then by all means, adopt some other convention for your own project's style guides.  PEP-8 is not some dictatorial decree from on high that all python be written one way and one way only - heck, even the standard library ignores PEP-8 when convenient, and the committers are loth to merge patches that only correct style issues.

> It destroys the visual flow of code and for what? To signify a global, constant,
> or Enum? Is that really so important? I don't think so. I think the all caps style
> has out-lived its usefulness and needs to go the way of the dodo.

I disagree.  They look fine to me, and don't break the flow of reading code for me.

> The last time I saw all caps used appropriately was in a YouTube comment
> where some guy was ranting about the communist Jewish banker conspiracy
> to control the world. In that case, all caps clearly communicated to me that
> the person was a frothing lunatic (thought find the idea of communist
> bankers intriguing).

Last I looked, you could not create variables in YouTube comments, so I don't see how that is germane.

> Currently PEP-8 prescribes all caps for constants
> <https://www.python.org/dev/peps/pep-0008/#constants>  and uses the all
> cap variable "FILES" as an example in a different section.
> <https://www.python.org/dev/peps/pep-0008/#when-to-use-trailing-
> commas>  It also appears to be the defacto-standard for enums (based on
> the documentation <https://docs.python.org/3/library/enum.html#creating-
> an-enum> )
> I don't think it's necessary to make any breaking changes. Just pep-8 and (of
> less importance) spurious documentation examples.

Again, you are free to use whatever style guide you choose - an act which in itself is compliant with PEP-8.

More information about the Python-ideas mailing list