Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107738 > unrolled thread
| Started by | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| First post | 2016-04-27 18:21 -0700 |
| Last post | 2016-04-27 18:21 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Differences between Class(Object) and Class(Dict) for dictionary usage? Christopher Reimer <christopher_reimer@icloud.com> - 2016-04-27 18:21 -0700
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-04-27 18:21 -0700 |
| Subject | Re: Differences between Class(Object) and Class(Dict) for dictionary usage? |
| Message-ID | <mailman.156.1461806474.32212.python-list@python.org> |
On 4/27/2016 7:24 AM, Ian Kelly wrote: > Some other great questions to ask yourself are "do I really want > len(my_object) to return the number of items in this dict" and "do I > really want list(my_object) to return all the keys in this dict"? If > the answer to all those is yes, then it's probably fair to say that > your object is-a dict and should be modeled as such. These questions are more useful for me to consider. For my chess piece base class, the answer is no. Thank you, Chris R.
Back to top | Article view | comp.lang.python
csiph-web