Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Classes Date: Tue, 04 Nov 2014 18:38:36 +1300 Lines: 14 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net auS7DyClGlrfXa5w2n6+VwFP5Ym0b34frD0CHLundAdgZuGb55 Cancel-Lock: sha1:phDTB4V0cJBlz1NjVNqRbtGZacY= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:80169 Jean-Michel Pichavant wrote: > Python uses the descriptor protocol which is > basically getters and setters. It's is just hidden by a strange decorator > syntax. This is about the interface, not the implementation. "Getters and setters" in this context means designing the API of your class to have things like getFoo() and setFoo() in it. That's not just totally unnecessary in Python, it's counterproductive. It makes the API tedious to use for no benefit. -- Greg