Team Ai
Apppublic

parthtamu/rag-code-assistant

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
xml.sax.utils.html434 linesDownload Raw Back to docs
1<!DOCTYPE html>2 3<html lang="en" data-content_root="../">4  <head>5    <meta charset="utf-8" />6    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />7<meta property="og:title" content="xml.sax.saxutils — SAX Utilities" />8<meta property="og:type" content="website" />9<meta property="og:url" content="https://docs.python.org/3/library/xml.sax.utils.html" />10<meta property="og:site_name" content="Python documentation" />11<meta property="og:description" content="Source code: Lib/xml/sax/saxutils.py The module xml.sax.saxutils contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base..." />12<meta property="og:image:width" content="1146" />13<meta property="og:image:height" content="600" />14<meta property="og:image" content="https://docs.python.org/3.15/_images/social_previews/summary_library_xml.sax.utils_3c1fc45e.png" />15<meta property="og:image:alt" content="Source code: Lib/xml/sax/saxutils.py The module xml.sax.saxutils contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base..." />16<meta name="description" content="Source code: Lib/xml/sax/saxutils.py The module xml.sax.saxutils contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base..." />17<meta name="twitter:card" content="summary_large_image" />18<meta name="theme-color" content="#3776ab">19 20    <title>xml.sax.saxutils — SAX Utilities &#8212; Python 3.15.0a6 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">21    22    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />23    <link rel="stylesheet" type="text/css" href="../_static/classic.css?v=234b1a7c" />24    <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=89a2f22a" />25    <link rel="stylesheet" type="text/css" href="../_static/profiling-sampling-visualization.css?v=0c2600ae" />26    <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=5349f25f" />27    28    <script src="../_static/documentation_options.js?v=6b7c9ff5"></script>29    <script src="../_static/doctools.js?v=9bcbadda"></script>30    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>31    <script src="../_static/profiling-sampling-visualization.js?v=9811ed04"></script>32    33    <script src="../_static/sidebar.js"></script>34    35    <link rel="search" type="application/opensearchdescription+xml"36          title="Search within Python 3.15.0a6 documentation"37          href="../_static/opensearch.xml"/>38    <link rel="author" title="About these documents" href="../about.html" />39    <link rel="index" title="Index" href="../genindex.html" />40    <link rel="search" title="Search" href="../search.html" />41    <link rel="copyright" title="Copyright" href="../copyright.html" />42    <link rel="next" title="xml.sax.xmlreader — Interface for XML parsers" href="xml.sax.reader.html" />43    <link rel="prev" title="xml.sax.handler — Base classes for SAX handlers" href="xml.sax.handler.html" />44    45      46      <script defer file-types="bz2,epub,zip" data-domain="docs.python.org" src="https://analytics.python.org/js/script.file-downloads.outbound-links.js"></script>47      48      <link rel="canonical" href="https://docs.python.org/3/library/xml.sax.utils.html">49      50    51 52    53    <style>54      @media only screen {55        table.full-width-table {56            width: 100%;57        }58      }59    </style>60<link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">61    <link rel="shortcut icon" type="image/png" href="../_static/py.svg">62            <script type="text/javascript" src="../_static/copybutton.js"></script>63            <script type="text/javascript" src="../_static/menu.js"></script>64            <script type="text/javascript" src="../_static/search-focus.js"></script>65            <script type="text/javascript" src="../_static/themetoggle.js"></script> 66            <script type="text/javascript" src="../_static/rtd_switcher.js"></script>67            <meta name="readthedocs-addons-api-version" content="1">68 69  </head>70<body>71<div class="mobile-nav">72    <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"73           aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu">74    <nav class="nav-content" role="navigation">75        <label for="menuToggler" class="toggler__label">76            <span></span>77        </label>78        <span class="nav-items-wrapper">79            <a href="https://www.python.org/" class="nav-logo">80                <img src="../_static/py.svg" alt="Python logo">81            </a>82            <span class="version_switcher_placeholder"></span>83            <form role="search" class="search" action="../search.html" method="get">84                <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">85                    <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>86                </svg>87                <input placeholder="Quick search" aria-label="Quick search" type="search" name="q">88                <input type="submit" value="Go">89            </form>90        </span>91    </nav>92    <div class="menu-wrapper">93        <nav class="menu" role="navigation" aria-label="main navigation">94            <div class="language_switcher_placeholder"></div>95            96<label class="theme-selector-label">97    Theme98    <select class="theme-selector" oninput="activateTheme(this.value)">99        <option value="auto" selected>Auto</option>100        <option value="light">Light</option>101        <option value="dark">Dark</option>102    </select>103</label>104  <div>105    <h4>Previous topic</h4>106    <p class="topless"><a href="xml.sax.handler.html"107                          title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.handler</span></code> — Base classes for SAX handlers</a></p>108  </div>109  <div>110    <h4>Next topic</h4>111    <p class="topless"><a href="xml.sax.reader.html"112                          title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.xmlreader</span></code> — Interface for XML parsers</a></p>113  </div>114  <script>115    document.addEventListener('DOMContentLoaded', () => {116        const title = document.querySelector('meta[property="og:title"]').content;117        const elements = document.querySelectorAll('.improvepage');118        const pageurl = window.location.href.split('?')[0];119        elements.forEach(element => {120            const url = new URL(element.href.split('?')[0].replace("-nojs", ""));121            url.searchParams.set('pagetitle', title);122            url.searchParams.set('pageurl', pageurl);123            url.searchParams.set('pagesource', "library/xml.sax.utils.rst");124            element.href = url.toString();125        });126    });127  </script>128  <div role="note" aria-label="source link">129    <h3>This page</h3>130    <ul class="this-page-menu">131      <li><a href="../bugs.html">Report a bug</a></li>132      <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>133      <li>134        <a href="https://github.com/python/cpython/blob/main/Doc/library/xml.sax.utils.rst?plain=1"135            rel="nofollow">Show source136        </a>137      </li>138      139    </ul>140  </div>141        </nav>142    </div>143</div>144 145  146    <div class="related" role="navigation" aria-label="Related">147      <h3>Navigation</h3>148      <ul>149        <li class="right" style="margin-right: 10px">150          <a href="../genindex.html" title="General Index"151             accesskey="I">index</a></li>152        <li class="right" >153          <a href="../py-modindex.html" title="Python Module Index"154             >modules</a> |</li>155        <li class="right" >156          <a href="xml.sax.reader.html" title="xml.sax.xmlreader — Interface for XML parsers"157             accesskey="N">next</a> |</li>158        <li class="right" >159          <a href="xml.sax.handler.html" title="xml.sax.handler — Base classes for SAX handlers"160             accesskey="P">previous</a> |</li>161 162          <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>163          <li><a href="https://www.python.org/">Python</a> &#187;</li>164          <li class="switchers">165            <div class="language_switcher_placeholder"></div>166            <div class="version_switcher_placeholder"></div>167          </li>168          <li>169              170          </li>171    <li id="cpython-language-and-version">172      <a href="../index.html">3.15.0a6 Documentation</a> &#187;173    </li>174 175          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>176          <li class="nav-item nav-item-2"><a href="markup.html" accesskey="U">Structured Markup Processing Tools</a> &#187;</li>177        <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> — SAX Utilities</a></li>178                <li class="right">179                    180 181    <div class="inline-search" role="search">182        <form class="inline-search" action="../search.html" method="get">183          <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">184          <input type="submit" value="Go">185        </form>186    </div>187                     |188                </li>189            <li class="right">190<label class="theme-selector-label">191    Theme192    <select class="theme-selector" oninput="activateTheme(this.value)">193        <option value="auto" selected>Auto</option>194        <option value="light">Light</option>195        <option value="dark">Dark</option>196    </select>197</label> |</li>198            199      </ul>200    </div>    201 202    <div class="document">203      <div class="documentwrapper">204        <div class="bodywrapper">205          <div class="body" role="main">206            207  <section id="module-xml.sax.saxutils">208<span id="xml-sax-saxutils-sax-utilities"></span><h1><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> — SAX Utilities<a class="headerlink" href="#module-xml.sax.saxutils" title="Link to this heading">¶</a></h1>209<p><strong>Source code:</strong> <a class="extlink-source reference external" href="https://github.com/python/cpython/tree/main/Lib/xml/sax/saxutils.py">Lib/xml/sax/saxutils.py</a></p>210<hr class="docutils" />211<p>The module <code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> contains a number of classes and functions212that are commonly useful when creating SAX applications, either in direct use,213or as base classes.</p>214<dl class="py function">215<dt class="sig sig-object py" id="xml.sax.saxutils.escape">216<span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">escape</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.escape" title="Link to this definition">¶</a></dt>217<dd><p>Escape <code class="docutils literal notranslate"><span class="pre">'&amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&gt;'</span></code> in a string of data.</p>218<p>You can escape other strings of data by passing a dictionary as the optional219<em>entities</em> parameter.  The keys and values must all be strings; each key will be220replaced with its corresponding value.  The characters <code class="docutils literal notranslate"><span class="pre">'&amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&lt;'</span></code> and221<code class="docutils literal notranslate"><span class="pre">'&gt;'</span></code> are always escaped, even if <em>entities</em> is provided.</p>222<div class="admonition note">223<p class="admonition-title">Note</p>224<p>This function should only be used to escape characters that225can’t be used directly in XML. Do not use this function as a general226string translation function.</p>227</div>228</dd></dl>229 230<dl class="py function">231<dt class="sig sig-object py" id="xml.sax.saxutils.unescape">232<span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">unescape</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.unescape" title="Link to this definition">¶</a></dt>233<dd><p>Unescape <code class="docutils literal notranslate"><span class="pre">'&amp;amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&amp;lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&amp;gt;'</span></code> in a string of data.</p>234<p>You can unescape other strings of data by passing a dictionary as the optional235<em>entities</em> parameter.  The keys and values must all be strings; each key will be236replaced with its corresponding value.  <code class="docutils literal notranslate"><span class="pre">'&amp;amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&amp;lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&amp;gt;'</span></code>237are always unescaped, even if <em>entities</em> is provided.</p>238</dd></dl>239 240<dl class="py function">241<dt class="sig sig-object py" id="xml.sax.saxutils.quoteattr">242<span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">quoteattr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.quoteattr" title="Link to this definition">¶</a></dt>243<dd><p>Similar to <a class="reference internal" href="#xml.sax.saxutils.escape" title="xml.sax.saxutils.escape"><code class="xref py py-func docutils literal notranslate"><span class="pre">escape()</span></code></a>, but also prepares <em>data</em> to be used as an244attribute value.  The return value is a quoted version of <em>data</em> with any245additional required replacements. <code class="xref py py-func docutils literal notranslate"><span class="pre">quoteattr()</span></code> will select a quote246character based on the content of <em>data</em>, attempting to avoid encoding any247quote characters in the string.  If both single- and double-quote characters248are already in <em>data</em>, the double-quote characters will be encoded and <em>data</em>249will be wrapped in double-quotes.  The resulting string can be used directly250as an attribute value:</p>251<div class="highlight-python3 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="s2">&quot;&lt;element attr=</span><span class="si">%s</span><span class="s2">&gt;&quot;</span> <span class="o">%</span> <span class="n">quoteattr</span><span class="p">(</span><span class="s2">&quot;ab &#39; cd </span><span class="se">\&quot;</span><span class="s2"> ef&quot;</span><span class="p">))</span>252<span class="go">&lt;element attr=&quot;ab &#39; cd &amp;quot; ef&quot;&gt;</span>253</pre></div>254</div>255<p>This function is useful when generating attribute values for HTML or any SGML256using the reference concrete syntax.</p>257</dd></dl>258 259<dl class="py class">260<dt class="sig sig-object py" id="xml.sax.saxutils.XMLGenerator">261<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">XMLGenerator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">out</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">encoding</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'iso-8859-1'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">short_empty_elements</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.XMLGenerator" title="Link to this definition">¶</a></dt>262<dd><p>This class implements the <a class="reference internal" href="xml.sax.handler.html#xml.sax.handler.ContentHandler" title="xml.sax.handler.ContentHandler"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContentHandler</span></code></a> interface263by writing SAX264events back into an XML document. In other words, using an <code class="xref py py-class docutils literal notranslate"><span class="pre">XMLGenerator</span></code>265as the content handler will reproduce the original document being parsed. <em>out</em>266should be a file-like object which will default to <em>sys.stdout</em>. <em>encoding</em> is267the encoding of the output stream which defaults to <code class="docutils literal notranslate"><span class="pre">'iso-8859-1'</span></code>.268<em>short_empty_elements</em> controls the formatting of elements that contain no269content:  if <code class="docutils literal notranslate"><span class="pre">False</span></code> (the default) they are emitted as a pair of start/end270tags, if set to <code class="docutils literal notranslate"><span class="pre">True</span></code> they are emitted as a single self-closed tag.</p>271<div class="versionchanged">272<p><span class="versionmodified changed">Changed in version 3.2: </span>Added the <em>short_empty_elements</em> parameter.</p>273</div>274</dd></dl>275 276<dl class="py class">277<dt class="sig sig-object py" id="xml.sax.saxutils.XMLFilterBase">278<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">XMLFilterBase</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">base</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.XMLFilterBase" title="Link to this definition">¶</a></dt>279<dd><p>This class is designed to sit between an280<a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.XMLReader" title="xml.sax.xmlreader.XMLReader"><code class="xref py py-class docutils literal notranslate"><span class="pre">XMLReader</span></code></a> and the client281application’s event handlers.  By default, it does nothing but pass requests up282to the reader and events on to the handlers unmodified, but subclasses can283override specific methods to modify the event stream or the configuration284requests as they pass through.</p>285</dd></dl>286 287<dl class="py function">288<dt class="sig sig-object py" id="xml.sax.saxutils.prepare_input_source">289<span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">prepare_input_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">source</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">base</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.prepare_input_source" title="Link to this definition">¶</a></dt>290<dd><p>This function takes an input source and an optional base URL and returns a291fully resolved <a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.InputSource" title="xml.sax.xmlreader.InputSource"><code class="xref py py-class docutils literal notranslate"><span class="pre">InputSource</span></code></a> object ready for292reading.  The input source can be given as a string, a file-like object, or293an <code class="xref py py-class docutils literal notranslate"><span class="pre">InputSource</span></code> object; parsers will use this294function to implement the polymorphic <em>source</em> argument to their295<a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.XMLReader.parse" title="xml.sax.xmlreader.XMLReader.parse"><code class="xref py py-meth docutils literal notranslate"><span class="pre">parse()</span></code></a> method.</p>296</dd></dl>297 298</section>299 300 301            <div class="clearer"></div>302          </div>303        </div>304      </div>305      <div class="sphinxsidebar" role="navigation" aria-label="Main">306        <div class="sphinxsidebarwrapper">307  <div>308    <h4>Previous topic</h4>309    <p class="topless"><a href="xml.sax.handler.html"310                          title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.handler</span></code> — Base classes for SAX handlers</a></p>311  </div>312  <div>313    <h4>Next topic</h4>314    <p class="topless"><a href="xml.sax.reader.html"315                          title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.xmlreader</span></code> — Interface for XML parsers</a></p>316  </div>317  <script>318    document.addEventListener('DOMContentLoaded', () => {319        const title = document.querySelector('meta[property="og:title"]').content;320        const elements = document.querySelectorAll('.improvepage');321        const pageurl = window.location.href.split('?')[0];322        elements.forEach(element => {323            const url = new URL(element.href.split('?')[0].replace("-nojs", ""));324            url.searchParams.set('pagetitle', title);325            url.searchParams.set('pageurl', pageurl);326            url.searchParams.set('pagesource', "library/xml.sax.utils.rst");327            element.href = url.toString();328        });329    });330  </script>331  <div role="note" aria-label="source link">332    <h3>This page</h3>333    <ul class="this-page-menu">334      <li><a href="../bugs.html">Report a bug</a></li>335      <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>336      <li>337        <a href="https://github.com/python/cpython/blob/main/Doc/library/xml.sax.utils.rst?plain=1"338            rel="nofollow">Show source339        </a>340      </li>341      342    </ul>343  </div>344        </div>345<div id="sidebarbutton" title="Collapse sidebar">346<span>«</span>347</div>348 349      </div>350      <div class="clearer"></div>351    </div>  352    <div class="related" role="navigation" aria-label="Related">353      <h3>Navigation</h3>354      <ul>355        <li class="right" style="margin-right: 10px">356          <a href="../genindex.html" title="General Index"357             >index</a></li>358        <li class="right" >359          <a href="../py-modindex.html" title="Python Module Index"360             >modules</a> |</li>361        <li class="right" >362          <a href="xml.sax.reader.html" title="xml.sax.xmlreader — Interface for XML parsers"363             >next</a> |</li>364        <li class="right" >365          <a href="xml.sax.handler.html" title="xml.sax.handler — Base classes for SAX handlers"366             >previous</a> |</li>367 368          <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>369          <li><a href="https://www.python.org/">Python</a> &#187;</li>370          <li class="switchers">371            <div class="language_switcher_placeholder"></div>372            <div class="version_switcher_placeholder"></div>373          </li>374          <li>375              376          </li>377    <li id="cpython-language-and-version">378      <a href="../index.html">3.15.0a6 Documentation</a> &#187;379    </li>380 381          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>382          <li class="nav-item nav-item-2"><a href="markup.html" >Structured Markup Processing Tools</a> &#187;</li>383        <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> — SAX Utilities</a></li>384                <li class="right">385                    386 387    <div class="inline-search" role="search">388        <form class="inline-search" action="../search.html" method="get">389          <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">390          <input type="submit" value="Go">391        </form>392    </div>393                     |394                </li>395            <li class="right">396<label class="theme-selector-label">397    Theme398    <select class="theme-selector" oninput="activateTheme(this.value)">399        <option value="auto" selected>Auto</option>400        <option value="light">Light</option>401        <option value="dark">Dark</option>402    </select>403</label> |</li>404            405      </ul>406    </div>  407    <div class="footer">408    &copy; <a href="../copyright.html">Copyright</a> 2001 Python Software Foundation.409    <br>410    This page is licensed under the Python Software Foundation License Version 2.411    <br>412    Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.413    <br>414    415      See <a href="/license.html">History and License</a> for more information.<br>416    417    418    <br>419 420    The Python Software Foundation is a non-profit corporation.421<a href="https://www.python.org/psf/donations/">Please donate.</a>422<br>423    <br>424      Last updated on Mar 10, 2026 (08:58 UTC).425    426      <a href="/bugs.html">Found a bug</a>?427    428    <br>429 430    Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.431    </div>432 433  </body>434</html>