Since Python has no const type. I have some attributes in a class that I do not wish to be modified.
So is it a good idea to define the attributes as property and only give it a getter without a setter? If not what is the issue?
class Aclass:
def __init__(self):
# do some init
@property
def constA(self):
return 'abc'
Many thanks.
J