[Python-Dev] Python Language Reference has no mention of list comÃprehensions

Ryan Gonzalez rymg19 at gmail.com
Thu Dec 3 11:09:56 EST 2015



On December 3, 2015 8:26:23 AM CST, Laura Creighton <lac at openend.se> wrote:
>In a message of Thu, 03 Dec 2015 13:37:17 +0000, Paul Moore writes:
>>On 3 December 2015 at 12:51, Laura Creighton <lac at openend.se> wrote:
>>> Intentional or Oversight?
>>
>>Hard to find :-)
>>
>>https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries
>>
>>I went via "Atoms" in the expression section, then followed the links
>>in the actual grammar spec.
>>
>>Paul
>
>I think the whole use of the language displays as in
>  
>  6.2.4. Displays for lists, sets and dictionaries
>
>  For constructing a list, a set or a dictionary Python provides 
>  special syntax called “displays”, each of them in two flavors:
>
>    either the container contents are listed explicitly, or
>    they are computed via a set of looping and filtering instructions, 
>    called a comprehension.
>
>is very odd.  I don't know anybody who talks of 'displays'.  They
>talk of 'two ways to construct a'.  
>
>Who came up with the word 'display' and what does it have going for
>it that I have missed?  Right now I think its chief virtue is that
>it is a meaningless noun.  (But not meaningless enough, as I
>associate displays with output, not construction).
>
>I think that 
>
>    6.2.4 Constructing lists, sets and dictionaries
>
>would be a much more useful title, and
>
>6.2.4 Constructing lists, sets and dictionaries -- explicitly or
>through the use of comprehensions
>

What about:

6.2.4 Constricting lists, sets, and dictionaries (including comprehensions)

or something to that effect?

>an even better one.
>
>Am I missing something important about the 'display' language?
>
>Laura
>_______________________________________________
>Python-Dev mailing list
>Python-Dev at python.org
>https://mail.python.org/mailman/listinfo/python-dev
>Unsubscribe:
>https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com

-- 
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.


More information about the Python-Dev mailing list