Two variable dictionary comprehension

Deborah Swanson python at deborahswanson.net
Mon Apr 3 10:30:40 EDT 2017


Gregory Ewing wrote, on April 02, 2017 11:35 PM
> 
> Deborah Swanson wrote:
> 
> > Oh, come on. That's a fairly obscure citation in the docs, one that 
> > would take a good deal of experience and time reading 
> through them to 
> > know was there,
> 
> You seemed to know that there was something called a "dict 
> comprehension". Googling for "python 3 dict comprehension" 
> gives me a link to an example of one in the docs as the second result.
> 
> The first result is a page in Dive Into Python containing
> a section on dict comprehensions.
> 
> Part of being a good programmer is knowing how to track
> down the information you need!
> 
> Having said that, the index of the Python docs could be 
> improved a bit in this area -- currently it only mentions 
> "list" under "comprehension" (although the page it leads to 
> discusses the other types as well).
> 
> -- 
> Greg

Despite my earlier words and protestations that I did look for two
variable dict comprehensions, fairly diligently, I am taking what you
said seriously. Obviously I shouldn't expect to find handy and
recognizable entries in the index for everything I might want to find in
the docs, and I plan to spend more time browsing around. 

Clearly there's more to be found in nooks, crannies and byways in the
docs than you'll get to from the given pointers in the index. Maybe it
would be worthwhile to scrape the whole mess and have it in searchable
text form. Another thing Python would be the right tool for the job for.
Regular updates as the docs are updated would be a good idea too. It's
obvious that today's Google isn't up to it, although it occurs to me
that I haven't tried Google's site search on python.org.

I hope you won't be miffed though if I still come up empty handed and
come back here to ask again.

Deborah




More information about the Python-list mailing list