Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51127 > unrolled thread
| Started by | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
|---|---|
| First post | 2013-07-24 13:51 +0100 |
| Last post | 2013-07-24 13:51 +0100 |
| 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() Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-07-24 13:51 +0100
| From | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
|---|---|
| Date | 2013-07-24 13:51 +0100 |
| Subject | Re: Python 3: dict & dict.keys() |
| Message-ID | <mailman.5033.1374670298.3114.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Jul 24, 2013 7:25 AM, "Peter Otten" <__peter__@web.de> wrote: > > Ethan Furman wrote: > > > So, my question boils down to: in Python 3 how is dict.keys() different > > from dict? What are the use cases? > > I just grepped through /usr/lib/python3, and could not identify a single > line where some_object.keys() wasn't either wrapped in a list (or set, > sorted, max) call, or iterated over. > > To me it looks like views are a solution waiting for a problem. What do you mean? Why would you want to create a temporary list just to iterate over it explicitly or implicitly (set, sorted, max,...)? Oscar
Back to top | Article view | comp.lang.python
csiph-web