python 3 constant

Benjamin Kaplan benjamin.kaplan at case.edu
Wed Jun 22 16:58:00 EDT 2011


On Jun 22, 2011 12:03 PM, "sidRo" <slacky2005 at gmail.com> wrote:
>
> How to declare a constant in python 3?
> --

You don't. Python doesn't have declarations (other than global and
nonlocal). Convention is that anything in all caps  should be considered a
constant but there's no language-level enforcement of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110622/7818371c/attachment.html>


More information about the Python-list mailing list