<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330033">
<div class="moz-cite-prefix">On 12/3/2015 5:56 PM, Chris Angelico
wrote:<br>
</div>
<blockquote
cite="mid:CAPTjJmpqM-+YrN-rAi0oO7-Bj_4g=9CaA9iN37Rv1JEdYjiSzg@mail.gmail.com"
type="cite">
<pre wrap="">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 <b class="moz-txt-star"><span class="moz-txt-tag">*</span>inside<span class="moz-txt-tag">*</span></b> those brackets can be one of two things:
1) A (possibly empty) comma-separated sequence of expressions
2) One or more nested 'for' loops, possibly guarded by 'if's, and a
single expression
So we have two subforms of the same basic syntax. The first one
corresponds better to the output format, in the same way that a string
literal might correspond to its repr under specific circumstances.
Neither is a literal. Neither is a call to a constructor function
(contrast "list()" or "list.__new__(list)", which do call a
constructor). So what is this shared syntax? Whatever word is used,
it's going to be a bit wrong. I'd be happy with either "constructor"
or "display", myself.</pre>
</blockquote>
<br>
Construction. It includes an implicit constructor call and does
more.<br>
</body>
</html>