Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51252 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2013-07-25 14:37 -0400 |
| Last post | 2013-07-25 14:37 -0400 |
| 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: Python 3: dict & dict.keys() Terry Reedy <tjreedy@udel.edu> - 2013-07-25 14:37 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2013-07-25 14:37 -0400 |
| Subject | Re: Python 3: dict & dict.keys() |
| Message-ID | <mailman.5114.1374777455.3114.python-list@python.org> |
On 7/25/2013 12:21 PM, Ethan Furman wrote: > On 07/25/2013 09:11 AM, Prasad, Ramit wrote: >> Hmm, that is a change that makes some sense to me. Does the view >> get updated when dictionary changes or is a new view needed? I >> assume the latter. > > Nope, the former. That is a big advantage that the views have over > concrete lists: they show the /current/ state, and so are always > up-do-date. I think 'view' is generally used in CS to mean a live view, as opposed to a snapshot. Memoryviews in 3.x are also live views. Dictionary views are read-only. I believe memoryviews can be read-write if allowed by the object being viewed. Python slices are snapshots. It has been proposed that they should be views to avoid copying memory, but that has been rejected since views necessarily keep the underlying object alive. Instead, applications can define the views they need. (They might, for instance, allow multiple slices in a view, as tk Text widgets do.) -- Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web