parthtamu/rag-code-assistant
0
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="Extending" />8<meta property="og:type" content="website" />9<meta property="og:url" content="https://docs.python.org/3/library/asyncio-extending.html" />10<meta property="og:site_name" content="Python documentation" />11<meta property="og:description" content="The main direction for asyncio extending is writing custom event loop classes. Asyncio has helpers that could be used to simplify this task. Writing a Custom Event Loop: asyncio.AbstractEventLoop d..." />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_asyncio-extending_1cf80ba1.png" />15<meta property="og:image:alt" content="The main direction for asyncio extending is writing custom event loop classes. Asyncio has helpers that could be used to simplify this task. Writing a Custom Event Loop: asyncio.AbstractEventLoop d..." />16<meta name="description" content="The main direction for asyncio extending is writing custom event loop classes. Asyncio has helpers that could be used to simplify this task. Writing a Custom Event Loop: asyncio.AbstractEventLoop d..." />17<meta name="twitter:card" content="summary_large_image" />18<meta name="theme-color" content="#3776ab">19 20 <title>Extending — 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="High-level API Index" href="asyncio-api-index.html" />43 <link rel="prev" title="Platform Support" href="asyncio-platforms.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/asyncio-extending.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 <h3><a href="../contents.html">Table of Contents</a></h3>106 <ul>107<li><a class="reference internal" href="#">Extending</a><ul>108<li><a class="reference internal" href="#writing-a-custom-event-loop">Writing a Custom Event Loop</a></li>109<li><a class="reference internal" href="#future-and-task-private-constructors">Future and Task private constructors</a></li>110<li><a class="reference internal" href="#task-lifetime-support">Task lifetime support</a></li>111</ul>112</li>113</ul>114 115 </div>116 <div>117 <h4>Previous topic</h4>118 <p class="topless"><a href="asyncio-platforms.html"119 title="previous chapter">Platform Support</a></p>120 </div>121 <div>122 <h4>Next topic</h4>123 <p class="topless"><a href="asyncio-api-index.html"124 title="next chapter">High-level API Index</a></p>125 </div>126 <script>127 document.addEventListener('DOMContentLoaded', () => {128 const title = document.querySelector('meta[property="og:title"]').content;129 const elements = document.querySelectorAll('.improvepage');130 const pageurl = window.location.href.split('?')[0];131 elements.forEach(element => {132 const url = new URL(element.href.split('?')[0].replace("-nojs", ""));133 url.searchParams.set('pagetitle', title);134 url.searchParams.set('pageurl', pageurl);135 url.searchParams.set('pagesource', "library/asyncio-extending.rst");136 element.href = url.toString();137 });138 });139 </script>140 <div role="note" aria-label="source link">141 <h3>This page</h3>142 <ul class="this-page-menu">143 <li><a href="../bugs.html">Report a bug</a></li>144 <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>145 <li>146 <a href="https://github.com/python/cpython/blob/main/Doc/library/asyncio-extending.rst?plain=1"147 rel="nofollow">Show source148 </a>149 </li>150 151 </ul>152 </div>153 </nav>154 </div>155</div>156 157 158 <div class="related" role="navigation" aria-label="Related">159 <h3>Navigation</h3>160 <ul>161 <li class="right" style="margin-right: 10px">162 <a href="../genindex.html" title="General Index"163 accesskey="I">index</a></li>164 <li class="right" >165 <a href="../py-modindex.html" title="Python Module Index"166 >modules</a> |</li>167 <li class="right" >168 <a href="asyncio-api-index.html" title="High-level API Index"169 accesskey="N">next</a> |</li>170 <li class="right" >171 <a href="asyncio-platforms.html" title="Platform Support"172 accesskey="P">previous</a> |</li>173 174 <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>175 <li><a href="https://www.python.org/">Python</a> »</li>176 <li class="switchers">177 <div class="language_switcher_placeholder"></div>178 <div class="version_switcher_placeholder"></div>179 </li>180 <li>181 182 </li>183 <li id="cpython-language-and-version">184 <a href="../index.html">3.15.0a6 Documentation</a> »185 </li>186 187 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>188 <li class="nav-item nav-item-2"><a href="ipc.html" >Networking and Interprocess Communication</a> »</li>189 <li class="nav-item nav-item-3"><a href="asyncio.html" accesskey="U"><code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncio</span></code> — Asynchronous I/O</a> »</li>190 <li class="nav-item nav-item-this"><a href="">Extending</a></li>191 <li class="right">192 193 194 <div class="inline-search" role="search">195 <form class="inline-search" action="../search.html" method="get">196 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">197 <input type="submit" value="Go">198 </form>199 </div>200 |201 </li>202 <li class="right">203<label class="theme-selector-label">204 Theme205 <select class="theme-selector" oninput="activateTheme(this.value)">206 <option value="auto" selected>Auto</option>207 <option value="light">Light</option>208 <option value="dark">Dark</option>209 </select>210</label> |</li>211 212 </ul>213 </div> 214 215 <div class="document">216 <div class="documentwrapper">217 <div class="bodywrapper">218 <div class="body" role="main">219 220 <section id="extending">221<h1>Extending<a class="headerlink" href="#extending" title="Link to this heading">¶</a></h1>222<p>The main direction for <a class="reference internal" href="asyncio.html#module-asyncio" title="asyncio: Asynchronous I/O."><code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncio</span></code></a> extending is writing custom <em>event loop</em>223classes. Asyncio has helpers that could be used to simplify this task.</p>224<div class="admonition note">225<p class="admonition-title">Note</p>226<p>Third-parties should reuse existing asyncio code with caution,227a new Python version is free to break backward compatibility228in <em>internal</em> part of API.</p>229</div>230<section id="writing-a-custom-event-loop">231<h2>Writing a Custom Event Loop<a class="headerlink" href="#writing-a-custom-event-loop" title="Link to this heading">¶</a></h2>232<p><a class="reference internal" href="asyncio-eventloop.html#asyncio.AbstractEventLoop" title="asyncio.AbstractEventLoop"><code class="xref py py-class docutils literal notranslate"><span class="pre">asyncio.AbstractEventLoop</span></code></a> declares very many methods. Implementing all them233from scratch is a tedious job.</p>234<p>A loop can get many common methods implementation for free by inheriting from235<code class="xref py py-class docutils literal notranslate"><span class="pre">asyncio.BaseEventLoop</span></code>.</p>236<p>In turn, the successor should implement a bunch of <em>private</em> methods declared but not237implemented in <code class="xref py py-class docutils literal notranslate"><span class="pre">asyncio.BaseEventLoop</span></code>.</p>238<p>For example, <code class="docutils literal notranslate"><span class="pre">loop.create_connection()</span></code> checks arguments, resolves DNS addresses, and239calls <code class="docutils literal notranslate"><span class="pre">loop._make_socket_transport()</span></code> that should be implemented by inherited class.240The <code class="docutils literal notranslate"><span class="pre">_make_socket_transport()</span></code> method is not documented and is considered as an241<em>internal</em> API.</p>242</section>243<section id="future-and-task-private-constructors">244<h2>Future and Task private constructors<a class="headerlink" href="#future-and-task-private-constructors" title="Link to this heading">¶</a></h2>245<p><a class="reference internal" href="asyncio-future.html#asyncio.Future" title="asyncio.Future"><code class="xref py py-class docutils literal notranslate"><span class="pre">asyncio.Future</span></code></a> and <a class="reference internal" href="asyncio-task.html#asyncio.Task" title="asyncio.Task"><code class="xref py py-class docutils literal notranslate"><span class="pre">asyncio.Task</span></code></a> should be never created directly,246please use corresponding <a class="reference internal" href="asyncio-eventloop.html#asyncio.loop.create_future" title="asyncio.loop.create_future"><code class="xref py py-meth docutils literal notranslate"><span class="pre">loop.create_future()</span></code></a> and <a class="reference internal" href="asyncio-eventloop.html#asyncio.loop.create_task" title="asyncio.loop.create_task"><code class="xref py py-meth docutils literal notranslate"><span class="pre">loop.create_task()</span></code></a>,247or <a class="reference internal" href="asyncio-task.html#asyncio.create_task" title="asyncio.create_task"><code class="xref py py-func docutils literal notranslate"><span class="pre">asyncio.create_task()</span></code></a> factories instead.</p>248<p>However, third-party <em>event loops</em> may <em>reuse</em> built-in future and task implementations249for the sake of getting a complex and highly optimized code for free.</p>250<p>For this purpose the following, <em>private</em> constructors are listed:</p>251<dl class="py method">252<dt class="sig sig-object py" id="asyncio.Future.__init__">253<span class="sig-prename descclassname"><span class="pre">Future.</span></span><span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">loop</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio.Future.__init__" title="Link to this definition">¶</a></dt>254<dd><p>Create a built-in future instance.</p>255<p><em>loop</em> is an optional event loop instance.</p>256</dd></dl>257 258<dl class="py method">259<dt class="sig sig-object py" id="asyncio.Task.__init__">260<span class="sig-prename descclassname"><span class="pre">Task.</span></span><span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">coro</span></span></em>, <em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">loop</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">name</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">context</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio.Task.__init__" title="Link to this definition">¶</a></dt>261<dd><p>Create a built-in task instance.</p>262<p><em>loop</em> is an optional event loop instance. The rest of arguments are described in263<a class="reference internal" href="asyncio-eventloop.html#asyncio.loop.create_task" title="asyncio.loop.create_task"><code class="xref py py-meth docutils literal notranslate"><span class="pre">loop.create_task()</span></code></a> description.</p>264<div class="versionchanged">265<p><span class="versionmodified changed">Changed in version 3.11: </span><em>context</em> argument is added.</p>266</div>267</dd></dl>268 269</section>270<section id="task-lifetime-support">271<h2>Task lifetime support<a class="headerlink" href="#task-lifetime-support" title="Link to this heading">¶</a></h2>272<p>A third party task implementation should call the following functions to keep a task273visible by <a class="reference internal" href="asyncio-task.html#asyncio.all_tasks" title="asyncio.all_tasks"><code class="xref py py-func docutils literal notranslate"><span class="pre">asyncio.all_tasks()</span></code></a> and <a class="reference internal" href="asyncio-task.html#asyncio.current_task" title="asyncio.current_task"><code class="xref py py-func docutils literal notranslate"><span class="pre">asyncio.current_task()</span></code></a>:</p>274<dl class="py function">275<dt class="sig sig-object py" id="asyncio._register_task">276<span class="sig-prename descclassname"><span class="pre">asyncio.</span></span><span class="sig-name descname"><span class="pre">_register_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio._register_task" title="Link to this definition">¶</a></dt>277<dd><p>Register a new <em>task</em> as managed by <em>asyncio</em>.</p>278<p>Call the function from a task constructor.</p>279</dd></dl>280 281<dl class="py function">282<dt class="sig sig-object py" id="asyncio._unregister_task">283<span class="sig-prename descclassname"><span class="pre">asyncio.</span></span><span class="sig-name descname"><span class="pre">_unregister_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">task</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio._unregister_task" title="Link to this definition">¶</a></dt>284<dd><p>Unregister a <em>task</em> from <em>asyncio</em> internal structures.</p>285<p>The function should be called when a task is about to finish.</p>286</dd></dl>287 288<dl class="py function">289<dt class="sig sig-object py" id="asyncio._enter_task">290<span class="sig-prename descclassname"><span class="pre">asyncio.</span></span><span class="sig-name descname"><span class="pre">_enter_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">loop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio._enter_task" title="Link to this definition">¶</a></dt>291<dd><p>Switch the current task to the <em>task</em> argument.</p>292<p>Call the function just before executing a portion of embedded <em>coroutine</em>293(<a class="reference internal" href="../reference/datamodel.html#coroutine.send" title="coroutine.send"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coroutine.send()</span></code></a> or <a class="reference internal" href="../reference/datamodel.html#coroutine.throw" title="coroutine.throw"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coroutine.throw()</span></code></a>).</p>294</dd></dl>295 296<dl class="py function">297<dt class="sig sig-object py" id="asyncio._leave_task">298<span class="sig-prename descclassname"><span class="pre">asyncio.</span></span><span class="sig-name descname"><span class="pre">_leave_task</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">loop</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">task</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#asyncio._leave_task" title="Link to this definition">¶</a></dt>299<dd><p>Switch the current task back from <em>task</em> to <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>300<p>Call the function just after <a class="reference internal" href="../reference/datamodel.html#coroutine.send" title="coroutine.send"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coroutine.send()</span></code></a> or <a class="reference internal" href="../reference/datamodel.html#coroutine.throw" title="coroutine.throw"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coroutine.throw()</span></code></a>301execution.</p>302</dd></dl>303 304</section>305</section>306 307 308 <div class="clearer"></div>309 </div>310 </div>311 </div>312 <div class="sphinxsidebar" role="navigation" aria-label="Main">313 <div class="sphinxsidebarwrapper">314 <div>315 <h3><a href="../contents.html">Table of Contents</a></h3>316 <ul>317<li><a class="reference internal" href="#">Extending</a><ul>318<li><a class="reference internal" href="#writing-a-custom-event-loop">Writing a Custom Event Loop</a></li>319<li><a class="reference internal" href="#future-and-task-private-constructors">Future and Task private constructors</a></li>320<li><a class="reference internal" href="#task-lifetime-support">Task lifetime support</a></li>321</ul>322</li>323</ul>324 325 </div>326 <div>327 <h4>Previous topic</h4>328 <p class="topless"><a href="asyncio-platforms.html"329 title="previous chapter">Platform Support</a></p>330 </div>331 <div>332 <h4>Next topic</h4>333 <p class="topless"><a href="asyncio-api-index.html"334 title="next chapter">High-level API Index</a></p>335 </div>336 <script>337 document.addEventListener('DOMContentLoaded', () => {338 const title = document.querySelector('meta[property="og:title"]').content;339 const elements = document.querySelectorAll('.improvepage');340 const pageurl = window.location.href.split('?')[0];341 elements.forEach(element => {342 const url = new URL(element.href.split('?')[0].replace("-nojs", ""));343 url.searchParams.set('pagetitle', title);344 url.searchParams.set('pageurl', pageurl);345 url.searchParams.set('pagesource', "library/asyncio-extending.rst");346 element.href = url.toString();347 });348 });349 </script>350 <div role="note" aria-label="source link">351 <h3>This page</h3>352 <ul class="this-page-menu">353 <li><a href="../bugs.html">Report a bug</a></li>354 <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>355 <li>356 <a href="https://github.com/python/cpython/blob/main/Doc/library/asyncio-extending.rst?plain=1"357 rel="nofollow">Show source358 </a>359 </li>360 361 </ul>362 </div>363 </div>364<div id="sidebarbutton" title="Collapse sidebar">365<span>«</span>366</div>367 368 </div>369 <div class="clearer"></div>370 </div> 371 <div class="related" role="navigation" aria-label="Related">372 <h3>Navigation</h3>373 <ul>374 <li class="right" style="margin-right: 10px">375 <a href="../genindex.html" title="General Index"376 >index</a></li>377 <li class="right" >378 <a href="../py-modindex.html" title="Python Module Index"379 >modules</a> |</li>380 <li class="right" >381 <a href="asyncio-api-index.html" title="High-level API Index"382 >next</a> |</li>383 <li class="right" >384 <a href="asyncio-platforms.html" title="Platform Support"385 >previous</a> |</li>386 387 <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>388 <li><a href="https://www.python.org/">Python</a> »</li>389 <li class="switchers">390 <div class="language_switcher_placeholder"></div>391 <div class="version_switcher_placeholder"></div>392 </li>393 <li>394 395 </li>396 <li id="cpython-language-and-version">397 <a href="../index.html">3.15.0a6 Documentation</a> »398 </li>399 400 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>401 <li class="nav-item nav-item-2"><a href="ipc.html" >Networking and Interprocess Communication</a> »</li>402 <li class="nav-item nav-item-3"><a href="asyncio.html" ><code class="xref py py-mod docutils literal notranslate"><span class="pre">asyncio</span></code> — Asynchronous I/O</a> »</li>403 <li class="nav-item nav-item-this"><a href="">Extending</a></li>404 <li class="right">405 406 407 <div class="inline-search" role="search">408 <form class="inline-search" action="../search.html" method="get">409 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">410 <input type="submit" value="Go">411 </form>412 </div>413 |414 </li>415 <li class="right">416<label class="theme-selector-label">417 Theme418 <select class="theme-selector" oninput="activateTheme(this.value)">419 <option value="auto" selected>Auto</option>420 <option value="light">Light</option>421 <option value="dark">Dark</option>422 </select>423</label> |</li>424 425 </ul>426 </div> 427 <div class="footer">428 © <a href="../copyright.html">Copyright</a> 2001 Python Software Foundation.429 <br>430 This page is licensed under the Python Software Foundation License Version 2.431 <br>432 Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.433 <br>434 435 See <a href="/license.html">History and License</a> for more information.<br>436 437 438 <br>439 440 The Python Software Foundation is a non-profit corporation.441<a href="https://www.python.org/psf/donations/">Please donate.</a>442<br>443 <br>444 Last updated on Mar 10, 2026 (08:58 UTC).445 446 <a href="/bugs.html">Found a bug</a>?447 448 <br>449 450 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.451 </div>452 453 </body>454</html>