[Python-ideas] Should Python have user-defined constants?

Steven D'Aprano steve at pearwood.info
Tue Nov 21 03:13:42 EST 2017


On Tue, Nov 21, 2017 at 02:38:45AM -0500, Joseph Jevnik wrote:

> How is that different from "pi = 3.14"?

pi = 3.14
pi = 5
print(pi)
# prints 5

let pi = 3.14
pi = 5
# raises an exception



-- 
Steve


More information about the Python-ideas mailing list