What is the << (double left arrow) syntax in YAML called, and where's it specced?
<p>The <code>&lt;&lt;:</code> operator in YAML is usable to import the contents of one mapping into another, similarly to the <code>**</code> double-splat operator in Python or <code>...</code> object destructuring operator in JavaScript. For example,</p>

<pre><code>foo:
  a: b
  &lt;&lt;:
    c: d
  e: f
</code></pre>

<p>is equivalent to</p>

<pre><code>foo:
  a: b
  c: d
  e: f
</code></pre>

<p>This is useful when used along with <a href="http://www.yaml.org/spec/1.2/spec.html#id2785586" rel="noreferrer">node anchors</a> to include some common default properties in many objects, as illustrated in, for example, the <a href="https://learnxinyminutes.com/docs/yaml/" rel="noreferrer">Learn YAML in Y minutes</a> tutorial:</p>

<blockquote>
<pre><code># Anchors can be used to duplicate/inherit properties
base: &amp;base
    name: Everyone has same name

foo: &amp;foo
    &lt;&lt;: *base
    age: 10

bar: &amp;bar
    &lt;&lt;: *base
    age: 20
</code></pre>
</blockquote>

<p>However, I am confused about where this syntax comes from or why it works. <kbd>CTRL</kbd>+<kbd>F</kbd>ing the <a href="http://yaml.org/spec/1.2/spec.html" rel="noreferrer">YAML spec</a> for <code>&lt;&lt;</code> reveals that it doesn't appear anywhere in the spec. Yet it's supported by, at the very least, <a href="http://pyyaml.org/" rel="noreferrer">PyYAML</a> and <a href="http://yaml-online-parser.appspot.com/" rel="noreferrer">http://yaml-online-parser.appspot.com/</a>.</p>

<p>What is this syntax, and how come it doesn't seem to appear in the spec?</p>