Python doesn't have constants

Опубликовано: 09 Октябрь 2024
на канале: Python Morsels
637
36

Variables point to objects. Constant variables in other languages cannot be reassigned. We don't have any equivalent of that in Python. We have immutable objects, but not constant variables.

https://pym.dev/python-doesnt-have-co...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 The CONSTANT convention
00:18 Variables point to objects
00:55 Immutable objects cannot be changed
01:20 Assignment changes what a variable points to
02:07 Python has immutable objects but not constant variables