Re: python 3 constant



On Wed, Jun 22, 2011 at 7:54 PM, sidRo <slacky2005@xxxxxxxxx> wrote:
How to declare a constant in python 3?

There aren't true constants in Python, but instead we use a standard
defined by PEP 8, which states constants are in all caps, for example,
PI = 3.14, as opposed to pi = 3.14 which could change (according to
PEP 8, that is)
.



Relevant Pages

  • Re: pep 8 constants
    ... Benjamin Kaplan wrote: ... Brendan Miller <catphive@xxxxxxxxxxxx ... Since the constants in the std lib no longer follow PEP 8, should we expect them to change at some point in the future? ... They are natural rather than arbitrary constants that I usually see in caps, so I could see them as being in a different subcategory. ...
    (comp.lang.python)
  • Re: python 3 constant
    ... There aren't true constants in Python, but instead we use a standard ... defined by PEP 8, which states constants are in all caps, for example, ... PEP 8, that is) ...
    (comp.lang.python)