[Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS

Chris Angelico rosuav at gmail.com
Fri Jan 4 20:15:42 EST 2019


On Sat, Jan 5, 2019 at 11:58 AM Abe Dillon <abedillon at gmail.com> wrote:
> You made EMOTE_PATH all caps signifying it's a constant, then added a comment saying that it "Can be overwritten prior to calling get_emote_list".
>
> So not only was your naming convention, on its own, insufficient to explain the API of your code, but you're completely violating PEP-8 because your using the constancy convention on something that's not constant. That's 100% counterintuitive. You subvert the one thing that all-caps is supposed to communicate.
>

If "don't change this externally" is the default, why would we have a
naming convention meaning "don't change this externally"? I think
you're misunderstanding the way that module constants are used in
Python. They CAN be overridden. That is part of the point. All-caps
does *not* signify "don't override this".

ChrisA


More information about the Python-ideas mailing list