Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80169
| 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 <greg.ewing@canterbury.ac.nz> |
| Newsgroups | comp.lang.python |
| Subject | Re: Classes |
| Date | Tue, 04 Nov 2014 18:38:36 +1300 |
| Lines | 14 |
| Message-ID | <cbr72vFmdcjU1@mid.individual.net> (permalink) |
| References | <mailman.15427.1415018508.18130.python-list@python.org> |
| 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 | <mailman.15427.1415018508.18130.python-list@python.org> |
| Xref | csiph.com comp.lang.python:80169 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Classes Jean-Michel Pichavant <jeanmichel@sequans.com> - 2014-11-03 13:41 +0100 Re: Classes Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-11-04 18:38 +1300
csiph-web