Re: [Tutor] @property vs @classmethod

2017-07-09 Thread Steven D'Aprano
On Sat, Jul 08, 2017 at 07:56:10PM -0600, Mats Wichmann wrote: > From OO people, though, we get the sputtering But... But... what about > encapsulation, data hiding, etc? Regular attributes are still encapsulated. There's no difference in encapsulation between: obj.x # a standard attribute obj

Re: [Tutor] @property vs @classmethod

2017-07-09 Thread Alan Gauld via Tutor
On 09/07/17 02:56, Mats Wichmann wrote: > From OO people, though, we get the sputtering But... But... what about > encapsulation, data hiding, etc? Encapsulation isn't really an issue here since Pythons classes fully encapsulate their data and methods. They just make them both public. Data Hidin