If you need to make a read-only attribute in Python, you can turn your attribute into a property that delegates to an attribute with almost the same name (but with an underscore prefix).
Read an article version at https://pym.dev/making-read-only-attr...
More Python screencasts at https://pym.dev/screencasts/
00:00 A property is like an auto-updating attribute
00:42 Properties can make read-only attributes
01:55 Using an underscore prefix for internal attributes
02:34 The single underscore prefix is just a convention
03:12 The property decorator can make a read-only attribute
On this page of the site you can watch the video online Making a read only attribute in Python with a duration of hours minute second in good quality, which was uploaded by the user Python Morsels 17 October 2022, share the link with friends and acquaintances, this video has already been watched 1,289 times on youtube and it was liked by 21 viewers. Enjoy your viewing!