Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80169
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Classes |
| Date | 2014-11-04 18:38 +1300 |
| Message-ID | <cbr72vFmdcjU1@mid.individual.net> (permalink) |
| References | <mailman.15427.1415018508.18130.python-list@python.org> |
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