[Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS
levkivskyi at gmail.com
Sat Jan 5 03:34:21 EST 2019
On Sat, 5 Jan 2019 at 02:46, David Mertz <mertz at gnosis.cx> wrote:
> Like everyone other than Abe in this thread, I find judicious use of
> CONSTANTS to be highly readable and useful.
> Yes, there is a little wiggle room about just how constant a constant has
> to be since Python doesn't have a straightforward way to create real
> constants. Very rarely I might change a value named in all caps. But the
> distinction between a value intended as fixed and one I merely probably
> won't change is worth marking typographically.... Especially since there's
> no actual Python semantics enforcing it.
There is. Mypy supports final names, final methods and whatnot
Anyway I don't see a problem in using CAPS for constants, finally it is
just a style guide, Python will work even with
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas