<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#330033" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 7/6/2018 9:01 PM, Terry Reedy wrote:<br>
</div>
<blockquote type="cite" cite="mid:phpdqh$t65$1@blaine.gmane.org">In
any case, Python's comprehensions use an English-syntax version of
extended set builder notation. "In Python, the set-builder's
braces are replaced with square brackets, parentheses, or curly
braces, giving list, generator, and set objects, respectively.
Python uses an English-based syntax."
<br>
<br>
<blockquote type="cite" style="color: #000000;">
<blockquote type="cite" style="color: #000000;">Also, "generator
builder" is not much more expressive than "generator
expression",
<br>
</blockquote>
</blockquote>
<br>
I looked for an alternative 'x' to 'comprehension' such that
'generator|list|set|dict x' works and is specific to the notation.
'Builder' is a reasonable choice.
</blockquote>
<br>
I'm not sure if your quote above was quoting documentation, or was a
suggested quote to add to the documentation, I think the latter, as
Google didn't find it.<br>
<br>
The conflict between the "Builder pattern" and "set-builder
notation" can be disambiguated by consistently using the hyphenated
"set-builder" (as wikipedia does). And happily, by using wikipedia
terms, they would be easily found with explanations outside of
python docs as well as (if this is done) inside. We do not need <br>
<br>
[ typ + ' builder' for typ in ('set', 'list', 'dict', 'generator')]<br>
<br>
only set-builder. The fencing and : determine the type of the
result. We could use<br>
<br>
[ typ + ' form of set-builder' for typ in ('set', 'list', 'dict',
'generator')]<br>
<br>
in the few places where the type of the set-builder must be
disambiguated, avoiding the need for the compound terms.<br>
<br>
The result of ( set-builder ) is a generator. We do not need the
term "generator expression" or "generator comprehension". Use
"generator form of set-builder"... yes, it is one or two syllables
longer, but is clearer.<br>
<br>
A generator can be produced in one of two ways: either a function
containing a yield, or a set-builder delimited by parentheses or
used as an actual parameter to a function, both of which can be
referred to as the "generator form of set-builder".<br>
<br>
Glenn<br>
</body>
</html>