Python Language Reference has no mention of list com�prehensions

2015-12-03 Thread Laura Creighton
Intentional or Oversight? Laura ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

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

2015-12-03 Thread Paul Moore
On 3 December 2015 at 12:51, Laura Creighton 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

Re: [Python-Dev] Python Language Reference has no mention of list comprehensions

2015-12-03 Thread M.-A. Lemburg
On 03.12.2015 14:37, Paul Moore wrote: > On 3 December 2015 at 12:51, Laura Creighton 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

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

2015-12-03 Thread Laura Creighton
In a message of Thu, 03 Dec 2015 13:37:17 +, Paul Moore writes: >On 3 December 2015 at 12:51, Laura Creighton 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 ex

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

2015-12-03 Thread Random832
On 2015-12-03, Laura Creighton wrote: > 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). In a

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

2015-12-03 Thread Laura Creighton
In a message of Thu, 03 Dec 2015 15:09:12 +, Random832 writes: >> 6.2.4 Constructing lists, sets and dictionaries -- explicitly or through >> the use of comprehensions > >I don't like the idea of calling it "explicit construction". >Explicit construction to me means the actual use of a ca

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

2015-12-03 Thread Ryan Gonzalez
On December 3, 2015 8:26:23 AM CST, Laura Creighton wrote: >In a message of Thu, 03 Dec 2015 13:37:17 +, Paul Moore writes: >>On 3 December 2015 at 12:51, Laura Creighton wrote: >>> Intentional or Oversight? >> >>Hard to find :-) >> >>https://docs.python.org/3/reference/expressions.html#dis

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

2015-12-03 Thread Ryan Gonzalez
On December 3, 2015 10:09:56 AM CST, Ryan Gonzalez wrote: > > >On December 3, 2015 8:26:23 AM CST, Laura Creighton >wrote: >>In a message of Thu, 03 Dec 2015 13:37:17 +, Paul Moore writes: >>>On 3 December 2015 at 12:51, Laura Creighton wrote: Intentional or Oversight? >>> >>>Hard to

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

2015-12-03 Thread MRAB
On 2015-12-03 15:09, Random832 wrote: On 2015-12-03, Laura Creighton wrote: 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

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

2015-12-03 Thread M.-A. Lemburg
On 03.12.2015 17:09, Ryan Gonzalez wrote: > > > On December 3, 2015 8:26:23 AM CST, Laura Creighton wrote: >> In a message of Thu, 03 Dec 2015 13:37:17 +, Paul Moore writes: >>> On 3 December 2015 at 12:51, Laura Creighton wrote: Intentional or Oversight? >>> >>> Hard to find :-) >>> >

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

2015-12-03 Thread R. David Murray
On Thu, 03 Dec 2015 16:15:30 +, MRAB wrote: > On 2015-12-03 15:09, Random832 wrote: > > On 2015-12-03, Laura Creighton wrote: > >> 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 meaningle

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

2015-12-03 Thread Paul Moore
On 3 December 2015 at 14:26, Laura Creighton wrote: > Am I missing something important about the 'display' language? It's a term that's used in the lisp and/or functional programming communities, I believe. And I think I recollect that something similar is used in (mathematical) set theory So it'

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

2015-12-03 Thread Guido van Rossum
I borrowed 'display' from the formal definition of ABC. It's still used in the quick reference: http://homepages.cwi.nl/~steven/abc/qr.html#EXPRESSIONS . I hadn't heard it before and didn't think to research its heritage. I like it for list/set/dict displays since it's rather a stretch to call thos

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

2015-12-03 Thread Andrew Barnert via Python-Dev
> On Dec 3, 2015, at 08:15, MRAB wrote: > >>> On 2015-12-03 15:09, Random832 wrote: >>> On 2015-12-03, Laura Creighton wrote: >>> 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 nou

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

2015-12-03 Thread Laura Creighton
What I would like is if it were a lot easier for a person who just saw a list comprehension for the very first time, and was told what it is, to have a much, much easier time finding it in the Reference Manual. Would a section on comprehensions in general, defining what a comprehension is be appro

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

2015-12-03 Thread M.-A. Lemburg
On 03.12.2015 18:30, Laura Creighton wrote: > What I would like is if it were a lot easier for a person who just > saw a list comprehension for the very first time, and was told what it > is, to have a much, much easier time finding it in the Reference Manual. Such a person should more likely be d

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

2015-12-03 Thread Stephen J. Turnbull
Laura Creighton writes: > Am I missing something important about the 'display' language? A display is a constructor that looks like a literal but isn't. It is syntactically like the printed output, but may contain expressions to be evaluated at runtime as well as compile-time constant expressio

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

2015-12-03 Thread Laura Creighton
So how do we get search to work so that people in the Language Reference who type in 'List Comprehension' get a hit? Laura ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.p

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

2015-12-03 Thread M.-A. Lemburg
On 03.12.2015 19:27, Laura Creighton wrote: > So how do we get search to work so that people in the Language > Reference who type in 'List Comprehension' get a hit? It seems that the search index is broken for at least a few documentation file releases: ok: https://docs.python.org/2.6/search.htm

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

2015-12-03 Thread Steven D'Aprano
On Thu, Dec 03, 2015 at 09:25:53AM -0800, Andrew Barnert via Python-Dev wrote: > > On Dec 3, 2015, at 08:15, MRAB wrote: > > > >>> On 2015-12-03 15:09, Random832 wrote: > >>> On 2015-12-03, Laura Creighton wrote: > >>> Who came up with the word 'display' and what does it have going for > >>> it

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

2015-12-03 Thread Chris Angelico
On Fri, Dec 4, 2015 at 12:25 PM, Steven D'Aprano wrote: > I don't see any good reason for maintaining that there's just one > syntax, "display", which comes in two forms: a comma-separated set of > values, or a for-loop. The only thing they have in common (syntax-wise) > is that they both use [ ]

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

2015-12-03 Thread Glenn Linderman
On 12/3/2015 5:56 PM, Chris Angelico wrote: You come across something syntactic that begins by opening a square bracket, and you know that its semantics are: "construct a new list". That's what's common here. What goes*inside* those brackets can be one of two things: 1) A (possibly empty) comm

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

2015-12-03 Thread MRAB
On 2015-12-04 01:25, Steven D'Aprano wrote: On Thu, Dec 03, 2015 at 09:25:53AM -0800, Andrew Barnert via Python-Dev wrote: > On Dec 3, 2015, at 08:15, MRAB wrote: > >>> On 2015-12-03 15:09, Random832 wrote: >>> On 2015-12-03, Laura Creighton wrote: >>> Who came up with the word 'display' and w

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

2015-12-03 Thread MRAB
On 2015-12-04 01:56, Chris Angelico wrote: On Fri, Dec 4, 2015 at 12:25 PM, Steven D'Aprano wrote: I don't see any good reason for maintaining that there's just one syntax, "display", which comes in two forms: a comma-separated set of values, or a for-loop. The only thing they have in common (s

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

2015-12-03 Thread Andrew Barnert via Python-Dev
On Dec 3, 2015, at 17:25, Steven D'Aprano wrote: > > On Thu, Dec 03, 2015 at 09:25:53AM -0800, Andrew Barnert via Python-Dev wrote: >>> On Dec 3, 2015, at 08:15, MRAB wrote: >>> > On 2015-12-03 15:09, Random832 wrote: > On 2015-12-03, Laura Creighton wrote: > Who came up with the w