Contribute Media
A thank you to everyone who makes this possible: Read More

Making a read-only attribute

Description

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).

Details

Improve this page