0
in python, what's the difference between using @property and using __variable for read-only?
2 Réponses
0
@property allows you to write something like this:
instance.attribute = whatever.
Which looks like you're assigning something, but in the background, something completely different happens (keyword: encapsulation).
I don't know exactly the relation you see with __-attributes. Can you explain a bit more?
0
nvm i tested it and those are completly different things, thank you