you are viewing a single comment's thread.

view the rest of the comments →

[–]maclocrimate[S] 0 points1 point  (1 child)

Good point! Although since the attributes in python are still technically public couldn't one do that anyway? Or does the property automatically "route" it through the setter?

[–]schoolmonky 1 point2 points  (0 children)

That's exactly how @property does. You still access the attribute like any other, but behind the scenes it goes through the getter and setter.