CINXE.COM

PEP 448 – Additional Unpacking Generalizations | peps.python.org

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="color-scheme" content="light dark"> <title>PEP 448 – Additional Unpacking Generalizations | peps.python.org</title> <link rel="shortcut icon" href="../_static/py.png"> <link rel="canonical" href="https://peps.python.org/pep-0448/"> <link rel="stylesheet" href="../_static/style.css" type="text/css"> <link rel="stylesheet" href="../_static/mq.css" type="text/css"> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" media="(prefers-color-scheme: light)" id="pyg-light"> <link rel="stylesheet" href="../_static/pygments_dark.css" type="text/css" media="(prefers-color-scheme: dark)" id="pyg-dark"> <link rel="alternate" type="application/rss+xml" title="Latest PEPs" href="https://peps.python.org/peps.rss"> <meta property="og:title" content='PEP 448 – Additional Unpacking Generalizations | peps.python.org'> <meta property="og:description" content="This PEP proposes extended usages of the * iterable unpacking operator and ** dictionary unpacking operators to allow unpacking in more positions, an arbitrary number of times, and in function calls and displays."> <meta property="og:type" content="website"> <meta property="og:url" content="https://peps.python.org/pep-0448/"> <meta property="og:site_name" content="Python Enhancement Proposals (PEPs)"> <meta property="og:image" content="https://peps.python.org/_static/og-image.png"> <meta property="og:image:alt" content="Python PEPs"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> <meta name="description" content="This PEP proposes extended usages of the * iterable unpacking operator and ** dictionary unpacking operators to allow unpacking in more positions, an arbitrary number of times, and in function calls and displays."> <meta name="theme-color" content="#3776ab"> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-sun-half" viewBox="0 0 24 24" pointer-events="all"> <title>Following system colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="9"></circle> <path d="M12 3v18m0-12l4.65-4.65M12 14.3l7.37-7.37M12 19.6l8.85-8.85"></path> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24" pointer-events="all"> <title>Selected dark colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"></path> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24" pointer-events="all"> <title>Selected light colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> </svg> <script> document.documentElement.dataset.colour_scheme = localStorage.getItem("colour_scheme") || "auto" </script> <section id="pep-page-section"> <header> <h1>Python Enhancement Proposals</h1> <ul class="breadcrumbs"> <li><a href="https://www.python.org/" title="The Python Programming Language">Python</a> &raquo; </li> <li><a href="../pep-0000/">PEP Index</a> &raquo; </li> <li>PEP 448</li> </ul> <button id="colour-scheme-cycler" onClick="setColourScheme(nextColourScheme())"> <svg aria-hidden="true" class="colour-scheme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-light"><use href="#svg-sun"></use></svg> <span class="visually-hidden">Toggle light / dark / auto colour theme</span> </button> </header> <article> <section id="pep-content"> <h1 class="page-title">PEP 448 – Additional Unpacking Generalizations</h1> <dl class="rfc2822 field-list simple"> <dt class="field-odd">Author<span class="colon">:</span></dt> <dd class="field-odd">Joshua Landau &lt;joshua&#32;&#97;t&#32;landau.ws&gt;</dd> <dt class="field-even">Discussions-To<span class="colon">:</span></dt> <dd class="field-even"><a class="reference external" href="https://mail.python.org/archives/list/python-ideas&#64;python.org/">Python-Ideas list</a></dd> <dt class="field-odd">Status<span class="colon">:</span></dt> <dd class="field-odd"><abbr title="Accepted and implementation complete, or no longer active">Final</abbr></dd> <dt class="field-even">Type<span class="colon">:</span></dt> <dd class="field-even"><abbr title="Normative PEP with a new feature for Python, implementation change for CPython or interoperability standard for the ecosystem">Standards Track</abbr></dd> <dt class="field-odd">Created<span class="colon">:</span></dt> <dd class="field-odd">29-Jun-2013</dd> <dt class="field-even">Python-Version<span class="colon">:</span></dt> <dd class="field-even">3.5</dd> <dt class="field-odd">Post-History<span class="colon">:</span></dt> <dd class="field-odd"><p></p></dd> </dl> <hr class="docutils" /> <section id="contents"> <details><summary>Table of Contents</summary><ul class="simple"> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#specification">Specification</a></li> <li><a class="reference internal" href="#disadvantages">Disadvantages</a></li> <li><a class="reference internal" href="#variations">Variations</a></li> <li><a class="reference internal" href="#approval">Approval</a></li> <li><a class="reference internal" href="#implementation">Implementation</a></li> <li><a class="reference internal" href="#references">References</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> </details></section> <section id="abstract"> <h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2> <p>This PEP proposes extended usages of the <code class="docutils literal notranslate"><span class="pre">*</span></code> iterable unpacking operator and <code class="docutils literal notranslate"><span class="pre">**</span></code> dictionary unpacking operators to allow unpacking in more positions, an arbitrary number of times, and in function calls and displays.</p> <p>Function calls are proposed to support an arbitrary number of unpackings rather than just one:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="o">*</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="mi">3</span><span class="p">)</span> <span class="go">1 2 3</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">dict</span><span class="p">(</span><span class="o">**</span><span class="p">{</span><span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">1</span><span class="p">},</span> <span class="n">y</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="o">**</span><span class="p">{</span><span class="s1">&#39;z&#39;</span><span class="p">:</span> <span class="mi">3</span><span class="p">})</span> <span class="go">{&#39;x&#39;: 1, &#39;y&#39;: 2, &#39;z&#39;: 3}</span> </pre></div> </div> <p>Unpacking is proposed to be allowed inside tuple, list, set, and dictionary displays:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="o">*</span><span class="nb">range</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span> <span class="mi">4</span> <span class="go">(0, 1, 2, 3, 4)</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">[</span><span class="o">*</span><span class="nb">range</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span> <span class="mi">4</span><span class="p">]</span> <span class="go">[0, 1, 2, 3, 4]</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">{</span><span class="o">*</span><span class="nb">range</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span> <span class="mi">4</span><span class="p">}</span> <span class="go">{0, 1, 2, 3, 4}</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">{</span><span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="o">**</span><span class="p">{</span><span class="s1">&#39;y&#39;</span><span class="p">:</span> <span class="mi">2</span><span class="p">}}</span> <span class="go">{&#39;x&#39;: 1, &#39;y&#39;: 2}</span> </pre></div> </div> <p>In dictionaries, later values will always override earlier ones:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="p">{</span><span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="o">**</span><span class="p">{</span><span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">2</span><span class="p">}}</span> <span class="go">{&#39;x&#39;: 2}</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">{</span><span class="o">**</span><span class="p">{</span><span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">2</span><span class="p">},</span> <span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="mi">1</span><span class="p">}</span> <span class="go">{&#39;x&#39;: 1}</span> </pre></div> </div> <p>This PEP does not include unpacking operators inside list, set and dictionary comprehensions although this has not been ruled out for future proposals.</p> </section> <section id="rationale"> <h2><a class="toc-backref" href="#rationale" role="doc-backlink">Rationale</a></h2> <p>Current usage of the <code class="docutils literal notranslate"><span class="pre">*</span></code> iterable unpacking operator features unnecessary restrictions that can harm readability.</p> <p>Unpacking multiple times has an obvious rationale. When you want to unpack several iterables into a function definition or follow an unpack with more positional arguments, the most natural way would be to write:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">function</span><span class="p">(</span><span class="o">**</span><span class="n">kw_arguments</span><span class="p">,</span> <span class="o">**</span><span class="n">more_arguments</span><span class="p">)</span> <span class="n">function</span><span class="p">(</span><span class="o">*</span><span class="n">arguments</span><span class="p">,</span> <span class="n">argument</span><span class="p">)</span> </pre></div> </div> <p>Simple examples where this is useful are <code class="docutils literal notranslate"><span class="pre">print</span></code> and <code class="docutils literal notranslate"><span class="pre">str.format</span></code>. Instead, you could be forced to write:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">kwargs</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">kw_arguments</span><span class="p">)</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">more_arguments</span><span class="p">)</span> <span class="n">function</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span> <span class="n">args</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">arguments</span><span class="p">)</span> <span class="n">args</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span> <span class="n">function</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span> </pre></div> </div> <p>or, if you know to do so:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">ChainMap</span> <span class="n">function</span><span class="p">(</span><span class="o">**</span><span class="n">ChainMap</span><span class="p">(</span><span class="n">more_arguments</span><span class="p">,</span> <span class="n">arguments</span><span class="p">))</span> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">chain</span> <span class="n">function</span><span class="p">(</span><span class="o">*</span><span class="n">chain</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="p">[</span><span class="n">arg</span><span class="p">]))</span> </pre></div> </div> <p>which add unnecessary line-noise and, with the first methods, causes duplication of work.</p> <p>There are two primary rationales for unpacking inside of containers. Firstly there is a symmetry of assignment, where <code class="docutils literal notranslate"><span class="pre">fst,</span> <span class="pre">*other,</span> <span class="pre">lst</span> <span class="pre">=</span> <span class="pre">elems</span></code> and <code class="docutils literal notranslate"><span class="pre">elems</span> <span class="pre">=</span> <span class="pre">fst,</span> <span class="pre">*other,</span> <span class="pre">lst</span></code> are approximate inverses, ignoring the specifics of types. This, in effect, simplifies the language by removing special cases.</p> <p>Secondly, it vastly simplifies types of “addition” such as combining dictionaries, and does so in an unambiguous and well-defined way:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">combination</span> <span class="o">=</span> <span class="p">{</span><span class="o">**</span><span class="n">first_dictionary</span><span class="p">,</span> <span class="s2">&quot;x&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;y&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">}</span> </pre></div> </div> <p>instead of:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">combination</span> <span class="o">=</span> <span class="n">first_dictionary</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span> <span class="n">combination</span><span class="o">.</span><span class="n">update</span><span class="p">({</span><span class="s2">&quot;x&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;y&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">})</span> </pre></div> </div> <p>which is especially important in contexts where expressions are preferred. This is also useful as a more readable way of summing iterables into a list, such as <code class="docutils literal notranslate"><span class="pre">my_list</span> <span class="pre">+</span> <span class="pre">list(my_tuple)</span> <span class="pre">+</span> <span class="pre">list(my_range)</span></code> which is now equivalent to just <code class="docutils literal notranslate"><span class="pre">[*my_list,</span> <span class="pre">*my_tuple,</span> <span class="pre">*my_range]</span></code>.</p> </section> <section id="specification"> <h2><a class="toc-backref" href="#specification" role="doc-backlink">Specification</a></h2> <p>Function calls may accept an unbounded number of <code class="docutils literal notranslate"><span class="pre">*</span></code> and <code class="docutils literal notranslate"><span class="pre">**</span></code> unpackings. There will be no restriction of the order of positional arguments with relation to <code class="docutils literal notranslate"><span class="pre">*</span></code> unpackings nor any restriction of the order of keyword arguments with relation to <code class="docutils literal notranslate"><span class="pre">**</span></code> unpackings.</p> <p>Function calls continue to have the restriction that keyword arguments must follow positional arguments and <code class="docutils literal notranslate"><span class="pre">**</span></code> unpackings must additionally follow <code class="docutils literal notranslate"><span class="pre">*</span></code> unpackings.</p> <p>Currently, if an argument is given multiple times — such as a positional argument given both positionally and by keyword — a <code class="docutils literal notranslate"><span class="pre">TypeError</span></code> is raised. This remains true for duplicate arguments provided through multiple <code class="docutils literal notranslate"><span class="pre">**</span></code> unpackings, e.g. <code class="docutils literal notranslate"><span class="pre">f(**{'x':</span> <span class="pre">2},</span> <span class="pre">**{'x':</span> <span class="pre">3})</span></code>, except that the error will be detected at runtime.</p> <p>A function looks like this:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">function</span><span class="p">(</span> <span class="n">argument</span> <span class="ow">or</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="n">argument</span> <span class="ow">or</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="n">kwargument</span> <span class="ow">or</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="n">kwargument</span> <span class="ow">or</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">...</span><span class="p">,</span> <span class="n">kwargument</span> <span class="ow">or</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span> <span class="n">kwargument</span> <span class="ow">or</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">,</span> <span class="o">...</span> <span class="p">)</span> </pre></div> </div> <p>Tuples, lists, sets and dictionaries will allow unpacking. This will act as if the elements from unpacked items were inserted in order at the site of unpacking, much as happens in unpacking in a function-call. Dictionaries require <code class="docutils literal notranslate"><span class="pre">**</span></code> unpacking; all the others require <code class="docutils literal notranslate"><span class="pre">*</span></code> unpacking.</p> <p>The keys in a dictionary remain in a right-to-left priority order, so <code class="docutils literal notranslate"><span class="pre">{**{'a':</span> <span class="pre">1},</span> <span class="pre">'a':</span> <span class="pre">2,</span> <span class="pre">**{'a':</span> <span class="pre">3}}</span></code> evaluates to <code class="docutils literal notranslate"><span class="pre">{'a':</span> <span class="pre">3}</span></code>. There is no restriction on the number or position of unpackings.</p> </section> <section id="disadvantages"> <h2><a class="toc-backref" href="#disadvantages" role="doc-backlink">Disadvantages</a></h2> <p>The allowable orders for arguments in a function call are more complicated than before. The simplest explanation for the rules may be “positional arguments precede keyword arguments and <code class="docutils literal notranslate"><span class="pre">**</span></code> unpacking; <code class="docutils literal notranslate"><span class="pre">*</span></code> unpacking precedes <code class="docutils literal notranslate"><span class="pre">**</span></code> unpacking”.</p> <p>Whilst <code class="docutils literal notranslate"><span class="pre">*elements,</span> <span class="pre">=</span> <span class="pre">iterable</span></code> causes <code class="docutils literal notranslate"><span class="pre">elements</span></code> to be a list, <code class="docutils literal notranslate"><span class="pre">elements</span> <span class="pre">=</span> <span class="pre">*iterable,</span></code> causes <code class="docutils literal notranslate"><span class="pre">elements</span></code> to be a tuple. The reason for this may confuse people unfamiliar with the construct.</p> <p>Concerns have been raised about the unexpected difference between duplicate keys in dictionaries being allowed but duplicate keys in function call syntax raising an error. Although this is already the case with current syntax, this proposal might exacerbate the issue. It remains to be seen how much of an issue this is in practice.</p> </section> <section id="variations"> <h2><a class="toc-backref" href="#variations" role="doc-backlink">Variations</a></h2> <p>The PEP originally considered whether the ordering of argument types in a function call (positional, keyword, <code class="docutils literal notranslate"><span class="pre">*</span></code> or <code class="docutils literal notranslate"><span class="pre">**</span></code>) could become less strict. This met little support so the idea was shelved.</p> <p>Earlier iterations of this PEP allowed unpacking operators inside list, set, and dictionary comprehensions as a flattening operator over iterables of containers:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">ranges</span> <span class="o">=</span> <span class="p">[</span><span class="nb">range</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">[</span><span class="o">*</span><span class="n">item</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">ranges</span><span class="p">]</span> <span class="go">[0, 0, 1, 0, 1, 2, 0, 1, 2, 3]</span> <span class="gp">&gt;&gt;&gt; </span><span class="p">{</span><span class="o">*</span><span class="n">item</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">ranges</span><span class="p">}</span> <span class="go">{0, 1, 2, 3}</span> </pre></div> </div> <p>This was met with a mix of strong concerns about readability and mild support. In order not to disadvantage the less controversial aspects of the PEP, this was not accepted with the rest of the proposal.</p> <p>Unbracketed comprehensions in function calls, such as <code class="docutils literal notranslate"><span class="pre">f(x</span> <span class="pre">for</span> <span class="pre">x</span> <span class="pre">in</span> <span class="pre">it)</span></code>, are already valid. These could be extended to:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">(</span><span class="o">*</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">it</span><span class="p">)</span> <span class="o">==</span> <span class="n">f</span><span class="p">((</span><span class="o">*</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">it</span><span class="p">))</span> <span class="n">f</span><span class="p">(</span><span class="o">**</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">it</span><span class="p">)</span> <span class="o">==</span> <span class="n">f</span><span class="p">({</span><span class="o">**</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">it</span><span class="p">})</span> </pre></div> </div> <p>However, it wasn’t clear if this was the best behaviour or if it should unpack into the arguments of the call to <code class="docutils literal notranslate"><span class="pre">f</span></code>. Since this is likely to be confusing and is of only very marginal utility, it is not included in this PEP. Instead, these will throw a <code class="docutils literal notranslate"><span class="pre">SyntaxError</span></code> and comprehensions with explicit brackets should be used instead.</p> </section> <section id="approval"> <h2><a class="toc-backref" href="#approval" role="doc-backlink">Approval</a></h2> <p>This PEP was accepted by Guido on February 25, 2015 <a class="footnote-reference brackets" href="#id3" id="id1">[1]</a>.</p> </section> <section id="implementation"> <h2><a class="toc-backref" href="#implementation" role="doc-backlink">Implementation</a></h2> <p>An implementation for Python 3.5 is found at Issue 2292 on bug tracker <a class="footnote-reference brackets" href="#id4" id="id2">[2]</a>. This currently includes support for unpacking inside comprehensions, which should be removed.</p> </section> <section id="references"> <h2><a class="toc-backref" href="#references" role="doc-backlink">References</a></h2> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="id3" role="doc-footnote"> <dt class="label" id="id3">[<a href="#id1">1</a>]</dt> <dd>PEP accepted, “PEP 448 review”, Guido van Rossum (<a class="reference external" href="https://mail.python.org/pipermail/python-dev/2015-February/138564.html">https://mail.python.org/pipermail/python-dev/2015-February/138564.html</a>)</aside> <aside class="footnote brackets" id="id4" role="doc-footnote"> <dt class="label" id="id4">[<a href="#id2">2</a>]</dt> <dd>Issue 2292, “Missing <code class="docutils literal notranslate"><span class="pre">*</span></code>-unpacking generalizations”, Thomas Wouters (<a class="reference external" href="https://github.com/python/cpython/issues/46545">https://github.com/python/cpython/issues/46545</a>)</aside> </aside> <p>[3] Discussion on Python-ideas list, “list / array comprehensions extension”, Alexander Heger (<a class="reference external" href="https://mail.python.org/pipermail/python-ideas/2011-December/013097.html">https://mail.python.org/pipermail/python-ideas/2011-December/013097.html</a>)</p> </section> <section id="copyright"> <h2><a class="toc-backref" href="#copyright" role="doc-backlink">Copyright</a></h2> <p>This document has been placed in the public domain.</p> </section> </section> <hr class="docutils" /> <p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-0448.rst">https://github.com/python/peps/blob/main/peps/pep-0448.rst</a></p> <p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-0448.rst">2023-12-11 18:58:32 GMT</a></p> </article> <nav id="pep-sidebar"> <h2>Contents</h2> <ul> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#specification">Specification</a></li> <li><a class="reference internal" href="#disadvantages">Disadvantages</a></li> <li><a class="reference internal" href="#variations">Variations</a></li> <li><a class="reference internal" href="#approval">Approval</a></li> <li><a class="reference internal" href="#implementation">Implementation</a></li> <li><a class="reference internal" href="#references">References</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> <br> <a id="source" href="https://github.com/python/peps/blob/main/peps/pep-0448.rst">Page Source (GitHub)</a> </nav> </section> <script src="../_static/colour_scheme.js"></script> <script src="../_static/wrap_tables.js"></script> <script src="../_static/sticky_banner.js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10