Dennis Lee Bieber <wlfr...@ix.netcom.com> writes:

> (Python does not have anything that one might consider a true constant
> -- other than the language defined singletons: None, and maybe by now
> True and False).

Python now deals with those by making the names keywords::

    >>> True = object()
      File "<stdin>", line 1
    SyntaxError: can't assign to keyword
    >>> False = object()
      File "<stdin>", line 1
    SyntaxError: can't assign to keyword
    >>> None = object()
      File "<stdin>", line 1
    SyntaxError: can't assign to keyword

which seems to rather avoid the question of whether they are “constants”
as would be understood by newcomers experienced with that term in other
languages.

-- 
 \       “Crime is contagious… if the government becomes a lawbreaker, |
  `\          it breeds contempt for the law.” —Justice Louis Brandeis |
_o__)                                                                  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to