CINXE.COM

PEP 3109 – Raising Exceptions in Python 3000 | 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 3109 – Raising Exceptions in Python 3000 | peps.python.org</title> <link rel="shortcut icon" href="../_static/py.png"> <link rel="canonical" href="https://peps.python.org/pep-3109/"> <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 3109 – Raising Exceptions in Python 3000 | peps.python.org'> <meta property="og:description" content="This PEP introduces changes to Python’s mechanisms for raising exceptions intended to reduce both line noise and the size of the language."> <meta property="og:type" content="website"> <meta property="og:url" content="https://peps.python.org/pep-3109/"> <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 introduces changes to Python’s mechanisms for raising exceptions intended to reduce both line noise and the size of the language."> <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 3109</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 3109 – Raising Exceptions in Python 3000</h1> <dl class="rfc2822 field-list simple"> <dt class="field-odd">Author<span class="colon">:</span></dt> <dd class="field-odd">Collin Winter &lt;collinwinter&#32;&#97;t&#32;google.com&gt;</dd> <dt class="field-even">Status<span class="colon">:</span></dt> <dd class="field-even"><abbr title="Accepted and implementation complete, or no longer active">Final</abbr></dd> <dt class="field-odd">Type<span class="colon">:</span></dt> <dd class="field-odd"><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-even">Created<span class="colon">:</span></dt> <dd class="field-even">19-Jan-2006</dd> <dt class="field-odd">Python-Version<span class="colon">:</span></dt> <dd class="field-odd">3.0</dd> <dt class="field-even">Post-History<span class="colon">:</span></dt> <dd class="field-even"><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="#grammar-changes">Grammar Changes</a></li> <li><a class="reference internal" href="#changes-to-builtin-types">Changes to Builtin Types</a></li> <li><a class="reference internal" href="#semantic-changes">Semantic Changes</a></li> <li><a class="reference internal" href="#compatibility-issues">Compatibility Issues</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 introduces changes to Python’s mechanisms for raising exceptions intended to reduce both line noise and the size of the language.</p> </section> <section id="rationale"> <h2><a class="toc-backref" href="#rationale" role="doc-backlink">Rationale</a></h2> <p>One of Python’s guiding maxims is <a class="pep reference internal" href="../pep-0020/" title="PEP 20 – The Zen of Python">“there should be one – and preferably only one – obvious way to do it”</a>. Python 2.x’s <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement violates this principle, permitting multiple ways of expressing the same thought. For example, these statements are equivalent:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">,</span> <span class="n">V</span> <span class="k">raise</span> <span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> </pre></div> </div> <p>There is a third form of the <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement, allowing arbitrary tracebacks to be attached to an exception <a class="footnote-reference brackets" href="#grammar" id="id1">[1]</a>:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">T</span> </pre></div> </div> <p>where T is a traceback. As specified in <a class="pep reference internal" href="../pep-0344/" title="PEP 344 – Exception Chaining and Embedded Tracebacks">PEP 344</a>, exception objects in Python 3.x will possess a <code class="docutils literal notranslate"><span class="pre">__traceback__</span></code> attribute, admitting this translation of the three-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">T</span> </pre></div> </div> <p>is translated to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">e</span> <span class="o">=</span> <span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> <span class="n">e</span><span class="o">.</span><span class="n">__traceback__</span> <span class="o">=</span> <span class="n">T</span> <span class="k">raise</span> <span class="n">e</span> </pre></div> </div> <p>Using these translations, we can reduce the <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement from four forms to two:</p> <ol class="arabic"> <li><code class="docutils literal notranslate"><span class="pre">raise</span></code> (with no arguments) is used to re-raise the active exception in an <code class="docutils literal notranslate"><span class="pre">except</span></code> suite.</li> <li><code class="docutils literal notranslate"><span class="pre">raise</span> <span class="pre">EXCEPTION</span></code> is used to raise a new exception. This form has two sub-variants: <code class="docutils literal notranslate"><span class="pre">EXCEPTION</span></code> may be an exception class or an instance of an exception class; valid exception classes are BaseException and its subclasses (<a class="pep reference internal" href="../pep-0352/" title="PEP 352 – Required Superclass for Exceptions">PEP 352</a>). If <code class="docutils literal notranslate"><span class="pre">EXCEPTION</span></code> is a subclass, it will be called with no arguments to obtain an exception instance.<p>To raise anything else is an error.</p> </li> </ol> <p>There is a further, more tangible benefit to be obtained through this consolidation, as noted by A.M. Kuchling <a class="footnote-reference brackets" href="#amk-line-noise" id="id2">[2]</a>.</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">PEP</span> <span class="mi">8</span> <span class="n">doesn</span><span class="s1">&#39;t express any preference between the</span> <span class="n">two</span> <span class="n">forms</span> <span class="n">of</span> <span class="k">raise</span> <span class="n">statements</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">,</span> <span class="s1">&#39;blah&#39;</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;blah&quot;</span><span class="p">)</span> <span class="n">I</span> <span class="n">like</span> <span class="n">the</span> <span class="n">second</span> <span class="n">form</span> <span class="n">better</span><span class="p">,</span> <span class="n">because</span> <span class="k">if</span> <span class="n">the</span> <span class="n">exception</span> <span class="n">arguments</span> <span class="n">are</span> <span class="n">long</span> <span class="ow">or</span> <span class="n">include</span> <span class="n">string</span> <span class="n">formatting</span><span class="p">,</span> <span class="n">you</span> <span class="n">don</span><span class="s1">&#39;t need to use line</span> <span class="n">continuation</span> <span class="n">characters</span> <span class="n">because</span> <span class="n">of</span> <span class="n">the</span> <span class="n">containing</span> <span class="n">parens</span><span class="o">.</span> </pre></div> </div> <p>The BDFL has concurred <a class="footnote-reference brackets" href="#guido-declaration" id="id3">[3]</a> and endorsed the consolidation of the several <code class="docutils literal notranslate"><span class="pre">raise</span></code> forms.</p> </section> <section id="grammar-changes"> <h2><a class="toc-backref" href="#grammar-changes" role="doc-backlink">Grammar Changes</a></h2> <p>In Python 3, the grammar for <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements will change from <a class="footnote-reference brackets" href="#grammar" id="id4">[1]</a></p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">raise_stmt</span><span class="p">:</span> <span class="s1">&#39;raise&#39;</span> <span class="p">[</span><span class="n">test</span> <span class="p">[</span><span class="s1">&#39;,&#39;</span> <span class="n">test</span> <span class="p">[</span><span class="s1">&#39;,&#39;</span> <span class="n">test</span><span class="p">]]]</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">raise_stmt</span><span class="p">:</span> <span class="s1">&#39;raise&#39;</span> <span class="p">[</span><span class="n">test</span><span class="p">]</span> </pre></div> </div> </section> <section id="changes-to-builtin-types"> <h2><a class="toc-backref" href="#changes-to-builtin-types" role="doc-backlink">Changes to Builtin Types</a></h2> <p>Because of its relation to exception raising, the signature for the <code class="docutils literal notranslate"><span class="pre">throw()</span></code> method on generator objects will change, dropping the optional second and third parameters. The signature thus changes (<a class="pep reference internal" href="../pep-0342/" title="PEP 342 – Coroutines via Enhanced Generators">PEP 342</a>) from</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="p">[</span><span class="n">V</span><span class="p">,</span> <span class="p">[</span><span class="n">T</span><span class="p">]])</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">EXCEPTION</span><span class="p">)</span> </pre></div> </div> <p>Where <code class="docutils literal notranslate"><span class="pre">EXCEPTION</span></code> is either a subclass of <code class="docutils literal notranslate"><span class="pre">BaseException</span></code> or an instance of a subclass of <code class="docutils literal notranslate"><span class="pre">BaseException</span></code>.</p> </section> <section id="semantic-changes"> <h2><a class="toc-backref" href="#semantic-changes" role="doc-backlink">Semantic Changes</a></h2> <p>In Python 2, the following <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement is legal</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="p">((</span><span class="n">E1</span><span class="p">,</span> <span class="p">(</span><span class="n">E2</span><span class="p">,</span> <span class="n">E3</span><span class="p">)),</span> <span class="n">E4</span><span class="p">),</span> <span class="n">V</span> </pre></div> </div> <p>The interpreter will take the tuple’s first element as the exception type (recursively), making the above fully equivalent to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E1</span><span class="p">,</span> <span class="n">V</span> </pre></div> </div> <p>As of Python 3.0, support for raising tuples like this will be dropped. This change will bring <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements into line with the <code class="docutils literal notranslate"><span class="pre">throw()</span></code> method on generator objects, which already disallows this.</p> </section> <section id="compatibility-issues"> <h2><a class="toc-backref" href="#compatibility-issues" role="doc-backlink">Compatibility Issues</a></h2> <p>All two- and three-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements will require modification, as will all two- and three-expression <code class="docutils literal notranslate"><span class="pre">throw()</span></code> calls on generators. Fortunately, the translation from Python 2.x to Python 3.x in this case is simple and can be handled mechanically by Guido van Rossum’s 2to3 utility <a class="footnote-reference brackets" href="#to3" id="id5">[4]</a> using the <code class="docutils literal notranslate"><span class="pre">raise</span></code> and <code class="docutils literal notranslate"><span class="pre">throw</span></code> fixers (<a class="footnote-reference brackets" href="#raise-fixer" id="id6">[5]</a>, <a class="footnote-reference brackets" href="#throw-fixer" id="id7">[6]</a>).</p> <p>The following translations will be performed:</p> <ol class="arabic"> <li>Zero- and one-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements will be left intact.</li> <li>Two-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements will be converted from<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">,</span> <span class="n">V</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> </pre></div> </div> <p>Two-expression <code class="docutils literal notranslate"><span class="pre">throw()</span></code> calls will be converted from</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="n">V</span><span class="p">)</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">))</span> </pre></div> </div> <p>See point #5 for a caveat to this transformation.</p> </li> <li>Three-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements will be converted from<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">raise</span> <span class="n">E</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">T</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">e</span> <span class="o">=</span> <span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> <span class="n">e</span><span class="o">.</span><span class="n">__traceback__</span> <span class="o">=</span> <span class="n">T</span> <span class="k">raise</span> <span class="n">e</span> </pre></div> </div> <p>Three-expression <code class="docutils literal notranslate"><span class="pre">throw()</span></code> calls will be converted from</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">E</span><span class="p">,</span> <span class="n">V</span><span class="p">,</span> <span class="n">T</span><span class="p">)</span> </pre></div> </div> <p>to</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">e</span> <span class="o">=</span> <span class="n">E</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> <span class="n">e</span><span class="o">.</span><span class="n">__traceback__</span> <span class="o">=</span> <span class="n">T</span> <span class="n">generator</span><span class="o">.</span><span class="n">throw</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> </pre></div> </div> <p>See point #5 for a caveat to this transformation.</p> </li> <li>Two- and three-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements where <code class="docutils literal notranslate"><span class="pre">E</span></code> is a tuple literal can be converted automatically using <code class="docutils literal notranslate"><span class="pre">2to3</span></code>’s <code class="docutils literal notranslate"><span class="pre">raise</span></code> fixer. <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements where <code class="docutils literal notranslate"><span class="pre">E</span></code> is a non-literal tuple, e.g., the result of a function call, will need to be converted manually.</li> <li>Two- and three-expression <code class="docutils literal notranslate"><span class="pre">raise</span></code> statements where <code class="docutils literal notranslate"><span class="pre">E</span></code> is an exception class and <code class="docutils literal notranslate"><span class="pre">V</span></code> is an exception instance will need special attention. These cases break down into two camps:<ol class="arabic"> <li><code class="docutils literal notranslate"><span class="pre">raise</span> <span class="pre">E,</span> <span class="pre">V</span></code> as a long-hand version of the zero-argument <code class="docutils literal notranslate"><span class="pre">raise</span></code> statement. As an example, assuming F is a subclass of E<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span> <span class="n">something</span><span class="p">()</span> <span class="k">except</span> <span class="n">F</span> <span class="k">as</span> <span class="n">V</span><span class="p">:</span> <span class="k">raise</span> <span class="n">F</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> <span class="k">except</span> <span class="n">E</span> <span class="k">as</span> <span class="n">V</span><span class="p">:</span> <span class="n">handle</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> </pre></div> </div> <p>This would be better expressed as</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span> <span class="n">something</span><span class="p">()</span> <span class="k">except</span> <span class="n">F</span><span class="p">:</span> <span class="k">raise</span> <span class="k">except</span> <span class="n">E</span> <span class="k">as</span> <span class="n">V</span><span class="p">:</span> <span class="n">handle</span><span class="p">(</span><span class="n">V</span><span class="p">)</span> </pre></div> </div> </li> <li><code class="docutils literal notranslate"><span class="pre">raise</span> <span class="pre">E,</span> <span class="pre">V</span></code> as a way of “casting” an exception to another class. Taking an example from distutils.compiler.unixcompiler<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">spawn</span><span class="p">(</span><span class="n">pp_args</span><span class="p">)</span> <span class="k">except</span> <span class="n">DistutilsExecError</span> <span class="k">as</span> <span class="n">msg</span><span class="p">:</span> <span class="k">raise</span> <span class="n">CompileError</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span> </pre></div> </div> <p>This would be better expressed as</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">spawn</span><span class="p">(</span><span class="n">pp_args</span><span class="p">)</span> <span class="k">except</span> <span class="n">DistutilsExecError</span> <span class="k">as</span> <span class="n">msg</span><span class="p">:</span> <span class="k">raise</span> <span class="n">CompileError</span> <span class="kn">from</span> <span class="nn">msg</span> </pre></div> </div> <p>Using the <code class="docutils literal notranslate"><span class="pre">raise</span> <span class="pre">...</span> <span class="pre">from</span> <span class="pre">...</span></code> syntax introduced in <a class="pep reference internal" href="../pep-0344/" title="PEP 344 – Exception Chaining and Embedded Tracebacks">PEP 344</a>.</p> </li> </ol> </li> </ol> </section> <section id="implementation"> <h2><a class="toc-backref" href="#implementation" role="doc-backlink">Implementation</a></h2> <p>This PEP was implemented in revision 57783 <a class="footnote-reference brackets" href="#r57783" id="id8">[7]</a>.</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="grammar" role="doc-footnote"> <dt class="label" id="grammar">[1]<em> (<a href='#id1'>1</a>, <a href='#id4'>2</a>) </em></dt> <dd><a class="reference external" href="http://docs.python.org/reference/simple_stmts.html#raise">http://docs.python.org/reference/simple_stmts.html#raise</a></aside> <aside class="footnote brackets" id="amk-line-noise" role="doc-footnote"> <dt class="label" id="amk-line-noise">[<a href="#id2">2</a>]</dt> <dd><a class="reference external" href="https://mail.python.org/pipermail/python-dev/2005-August/055187.html">https://mail.python.org/pipermail/python-dev/2005-August/055187.html</a></aside> <aside class="footnote brackets" id="guido-declaration" role="doc-footnote"> <dt class="label" id="guido-declaration">[<a href="#id3">3</a>]</dt> <dd><a class="reference external" href="https://mail.python.org/pipermail/python-dev/2005-August/055190.html">https://mail.python.org/pipermail/python-dev/2005-August/055190.html</a></aside> <aside class="footnote brackets" id="to3" role="doc-footnote"> <dt class="label" id="to3">[<a href="#id5">4</a>]</dt> <dd><a class="reference external" href="http://svn.python.org/view/sandbox/trunk/2to3/">http://svn.python.org/view/sandbox/trunk/2to3/</a></aside> <aside class="footnote brackets" id="raise-fixer" role="doc-footnote"> <dt class="label" id="raise-fixer">[<a href="#id6">5</a>]</dt> <dd><a class="reference external" href="http://svn.python.org/view/sandbox/trunk/2to3/fixes/fix_raise.py">http://svn.python.org/view/sandbox/trunk/2to3/fixes/fix_raise.py</a></aside> <aside class="footnote brackets" id="throw-fixer" role="doc-footnote"> <dt class="label" id="throw-fixer">[<a href="#id7">6</a>]</dt> <dd><a class="reference external" href="http://svn.python.org/view/sandbox/trunk/2to3/fixes/fix_throw.py">http://svn.python.org/view/sandbox/trunk/2to3/fixes/fix_throw.py</a></aside> <aside class="footnote brackets" id="r57783" role="doc-footnote"> <dt class="label" id="r57783">[<a href="#id8">7</a>]</dt> <dd><a class="reference external" href="http://svn.python.org/view/python/branches/py3k/Include/?rev=57783&amp;view=rev">http://svn.python.org/view/python/branches/py3k/Include/?rev=57783&amp;view=rev</a></aside> </aside> </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-3109.rst">https://github.com/python/peps/blob/main/peps/pep-3109.rst</a></p> <p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-3109.rst">2023-09-09 17:39:29 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="#grammar-changes">Grammar Changes</a></li> <li><a class="reference internal" href="#changes-to-builtin-types">Changes to Builtin Types</a></li> <li><a class="reference internal" href="#semantic-changes">Semantic Changes</a></li> <li><a class="reference internal" href="#compatibility-issues">Compatibility Issues</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-3109.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