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="stringprep — Internet String Preparation" />8<meta property="og:type" content="website" />9<meta property="og:url" content="https://docs.python.org/3/library/stringprep.html" />10<meta property="og:site_name" content="Python documentation" />11<meta property="og:description" content="Source code: Lib/stringprep.py When identifying things (such as host names) in the internet, it is often necessary to compare such identifications for “equality”. Exactly how this comparison is exe..." />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_stringprep_f8123897.png" />15<meta property="og:image:alt" content="Source code: Lib/stringprep.py When identifying things (such as host names) in the internet, it is often necessary to compare such identifications for “equality”. Exactly how this comparison is exe..." />16<meta name="description" content="Source code: Lib/stringprep.py When identifying things (such as host names) in the internet, it is often necessary to compare such identifications for “equality”. Exactly how this comparison is exe..." />17<meta name="twitter:card" content="summary_large_image" />18<meta name="theme-color" content="#3776ab">19 20 <title>stringprep — Internet String Preparation — 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="readline — GNU readline interface" href="readline.html" />43 <link rel="prev" title="unicodedata — Unicode Database" href="unicodedata.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/stringprep.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="unicodedata.html"107 title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unicodedata</span></code> — Unicode Database</a></p>108 </div>109 <div>110 <h4>Next topic</h4>111 <p class="topless"><a href="readline.html"112 title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">readline</span></code> — GNU readline interface</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/stringprep.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/stringprep.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="readline.html" title="readline — GNU readline interface"157 accesskey="N">next</a> |</li>158 <li class="right" >159 <a href="unicodedata.html" title="unicodedata — Unicode Database"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> »</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> »173 </li>174 175 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>176 <li class="nav-item nav-item-2"><a href="text.html" accesskey="U">Text Processing Services</a> »</li>177 <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> — Internet String Preparation</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-stringprep">208<span id="stringprep-internet-string-preparation"></span><h1><code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> — Internet String Preparation<a class="headerlink" href="#module-stringprep" 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/stringprep.py">Lib/stringprep.py</a></p>210<hr class="docutils" />211<p>When identifying things (such as host names) in the internet, it is often212necessary to compare such identifications for “equality”. Exactly how this213comparison is executed may depend on the application domain, e.g. whether it214should be case-insensitive or not. It may be also necessary to restrict the215possible identifications, to allow only identifications consisting of216“printable” characters.</p>217<p><span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc3454.html"><strong>RFC 3454</strong></a> defines a procedure for “preparing” Unicode strings in internet218protocols. Before passing strings onto the wire, they are processed with the219preparation procedure, after which they have a certain normalized form. The RFC220defines a set of tables, which can be combined into profiles. Each profile must221define which tables it uses, and what other optional parts of the <code class="docutils literal notranslate"><span class="pre">stringprep</span></code>222procedure are part of the profile. One example of a <code class="docutils literal notranslate"><span class="pre">stringprep</span></code> profile is223<code class="docutils literal notranslate"><span class="pre">nameprep</span></code>, which is used for internationalized domain names.</p>224<p>The module <code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> only exposes the tables from <span class="target" id="index-1"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc3454.html"><strong>RFC 3454</strong></a>. As these225tables would be very large to represent as dictionaries or lists, the226module uses the Unicode character database internally. The module source code227itself was generated using the <code class="docutils literal notranslate"><span class="pre">mkstringprep.py</span></code> utility.</p>228<p>As a result, these tables are exposed as functions, not as data structures.229There are two kinds of tables in the RFC: sets and mappings. For a set,230<code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> provides the “characteristic function”, i.e. a function that231returns <code class="docutils literal notranslate"><span class="pre">True</span></code> if the parameter is part of the set. For mappings, it provides the232mapping function: given the key, it returns the associated value. Below is a233list of all functions available in the module.</p>234<dl class="py function">235<dt class="sig sig-object py" id="stringprep.in_table_a1">236<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_a1</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_a1" title="Link to this definition">¶</a></dt>237<dd><p>Determine whether <em>code</em> is in tableA.1 (Unassigned code points in Unicode 3.2).</p>238</dd></dl>239 240<dl class="py function">241<dt class="sig sig-object py" id="stringprep.in_table_b1">242<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_b1</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_b1" title="Link to this definition">¶</a></dt>243<dd><p>Determine whether <em>code</em> is in tableB.1 (Commonly mapped to nothing).</p>244</dd></dl>245 246<dl class="py function">247<dt class="sig sig-object py" id="stringprep.map_table_b2">248<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">map_table_b2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.map_table_b2" title="Link to this definition">¶</a></dt>249<dd><p>Return the mapped value for <em>code</em> according to tableB.2 (Mapping for250case-folding used with NFKC).</p>251</dd></dl>252 253<dl class="py function">254<dt class="sig sig-object py" id="stringprep.map_table_b3">255<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">map_table_b3</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.map_table_b3" title="Link to this definition">¶</a></dt>256<dd><p>Return the mapped value for <em>code</em> according to tableB.3 (Mapping for257case-folding used with no normalization).</p>258</dd></dl>259 260<dl class="py function">261<dt class="sig sig-object py" id="stringprep.in_table_c11">262<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c11</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c11" title="Link to this definition">¶</a></dt>263<dd><p>Determine whether <em>code</em> is in tableC.1.1 (ASCII space characters).</p>264</dd></dl>265 266<dl class="py function">267<dt class="sig sig-object py" id="stringprep.in_table_c12">268<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c12</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c12" title="Link to this definition">¶</a></dt>269<dd><p>Determine whether <em>code</em> is in tableC.1.2 (Non-ASCII space characters).</p>270</dd></dl>271 272<dl class="py function">273<dt class="sig sig-object py" id="stringprep.in_table_c11_c12">274<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c11_c12</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c11_c12" title="Link to this definition">¶</a></dt>275<dd><p>Determine whether <em>code</em> is in tableC.1 (Space characters, union of C.1.1 and276C.1.2).</p>277</dd></dl>278 279<dl class="py function">280<dt class="sig sig-object py" id="stringprep.in_table_c21">281<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c21</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c21" title="Link to this definition">¶</a></dt>282<dd><p>Determine whether <em>code</em> is in tableC.2.1 (ASCII control characters).</p>283</dd></dl>284 285<dl class="py function">286<dt class="sig sig-object py" id="stringprep.in_table_c22">287<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c22</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c22" title="Link to this definition">¶</a></dt>288<dd><p>Determine whether <em>code</em> is in tableC.2.2 (Non-ASCII control characters).</p>289</dd></dl>290 291<dl class="py function">292<dt class="sig sig-object py" id="stringprep.in_table_c21_c22">293<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c21_c22</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c21_c22" title="Link to this definition">¶</a></dt>294<dd><p>Determine whether <em>code</em> is in tableC.2 (Control characters, union of C.2.1 and295C.2.2).</p>296</dd></dl>297 298<dl class="py function">299<dt class="sig sig-object py" id="stringprep.in_table_c3">300<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c3</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c3" title="Link to this definition">¶</a></dt>301<dd><p>Determine whether <em>code</em> is in tableC.3 (Private use).</p>302</dd></dl>303 304<dl class="py function">305<dt class="sig sig-object py" id="stringprep.in_table_c4">306<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c4</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c4" title="Link to this definition">¶</a></dt>307<dd><p>Determine whether <em>code</em> is in tableC.4 (Non-character code points).</p>308</dd></dl>309 310<dl class="py function">311<dt class="sig sig-object py" id="stringprep.in_table_c5">312<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c5</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c5" title="Link to this definition">¶</a></dt>313<dd><p>Determine whether <em>code</em> is in tableC.5 (Surrogate codes).</p>314</dd></dl>315 316<dl class="py function">317<dt class="sig sig-object py" id="stringprep.in_table_c6">318<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c6</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c6" title="Link to this definition">¶</a></dt>319<dd><p>Determine whether <em>code</em> is in tableC.6 (Inappropriate for plain text).</p>320</dd></dl>321 322<dl class="py function">323<dt class="sig sig-object py" id="stringprep.in_table_c7">324<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c7</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c7" title="Link to this definition">¶</a></dt>325<dd><p>Determine whether <em>code</em> is in tableC.7 (Inappropriate for canonical326representation).</p>327</dd></dl>328 329<dl class="py function">330<dt class="sig sig-object py" id="stringprep.in_table_c8">331<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c8</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c8" title="Link to this definition">¶</a></dt>332<dd><p>Determine whether <em>code</em> is in tableC.8 (Change display properties or are333deprecated).</p>334</dd></dl>335 336<dl class="py function">337<dt class="sig sig-object py" id="stringprep.in_table_c9">338<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_c9</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_c9" title="Link to this definition">¶</a></dt>339<dd><p>Determine whether <em>code</em> is in tableC.9 (Tagging characters).</p>340</dd></dl>341 342<dl class="py function">343<dt class="sig sig-object py" id="stringprep.in_table_d1">344<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_d1</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_d1" title="Link to this definition">¶</a></dt>345<dd><p>Determine whether <em>code</em> is in tableD.1 (Characters with bidirectional property346“R” or “AL”).</p>347</dd></dl>348 349<dl class="py function">350<dt class="sig sig-object py" id="stringprep.in_table_d2">351<span class="sig-prename descclassname"><span class="pre">stringprep.</span></span><span class="sig-name descname"><span class="pre">in_table_d2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">code</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#stringprep.in_table_d2" title="Link to this definition">¶</a></dt>352<dd><p>Determine whether <em>code</em> is in tableD.2 (Characters with bidirectional property353“L”).</p>354</dd></dl>355 356</section>357 358 359 <div class="clearer"></div>360 </div>361 </div>362 </div>363 <div class="sphinxsidebar" role="navigation" aria-label="Main">364 <div class="sphinxsidebarwrapper">365 <div>366 <h4>Previous topic</h4>367 <p class="topless"><a href="unicodedata.html"368 title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">unicodedata</span></code> — Unicode Database</a></p>369 </div>370 <div>371 <h4>Next topic</h4>372 <p class="topless"><a href="readline.html"373 title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">readline</span></code> — GNU readline interface</a></p>374 </div>375 <script>376 document.addEventListener('DOMContentLoaded', () => {377 const title = document.querySelector('meta[property="og:title"]').content;378 const elements = document.querySelectorAll('.improvepage');379 const pageurl = window.location.href.split('?')[0];380 elements.forEach(element => {381 const url = new URL(element.href.split('?')[0].replace("-nojs", ""));382 url.searchParams.set('pagetitle', title);383 url.searchParams.set('pageurl', pageurl);384 url.searchParams.set('pagesource', "library/stringprep.rst");385 element.href = url.toString();386 });387 });388 </script>389 <div role="note" aria-label="source link">390 <h3>This page</h3>391 <ul class="this-page-menu">392 <li><a href="../bugs.html">Report a bug</a></li>393 <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>394 <li>395 <a href="https://github.com/python/cpython/blob/main/Doc/library/stringprep.rst?plain=1"396 rel="nofollow">Show source397 </a>398 </li>399 400 </ul>401 </div>402 </div>403<div id="sidebarbutton" title="Collapse sidebar">404<span>«</span>405</div>406 407 </div>408 <div class="clearer"></div>409 </div> 410 <div class="related" role="navigation" aria-label="Related">411 <h3>Navigation</h3>412 <ul>413 <li class="right" style="margin-right: 10px">414 <a href="../genindex.html" title="General Index"415 >index</a></li>416 <li class="right" >417 <a href="../py-modindex.html" title="Python Module Index"418 >modules</a> |</li>419 <li class="right" >420 <a href="readline.html" title="readline — GNU readline interface"421 >next</a> |</li>422 <li class="right" >423 <a href="unicodedata.html" title="unicodedata — Unicode Database"424 >previous</a> |</li>425 426 <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>427 <li><a href="https://www.python.org/">Python</a> »</li>428 <li class="switchers">429 <div class="language_switcher_placeholder"></div>430 <div class="version_switcher_placeholder"></div>431 </li>432 <li>433 434 </li>435 <li id="cpython-language-and-version">436 <a href="../index.html">3.15.0a6 Documentation</a> »437 </li>438 439 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>440 <li class="nav-item nav-item-2"><a href="text.html" >Text Processing Services</a> »</li>441 <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">stringprep</span></code> — Internet String Preparation</a></li>442 <li class="right">443 444 445 <div class="inline-search" role="search">446 <form class="inline-search" action="../search.html" method="get">447 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">448 <input type="submit" value="Go">449 </form>450 </div>451 |452 </li>453 <li class="right">454<label class="theme-selector-label">455 Theme456 <select class="theme-selector" oninput="activateTheme(this.value)">457 <option value="auto" selected>Auto</option>458 <option value="light">Light</option>459 <option value="dark">Dark</option>460 </select>461</label> |</li>462 463 </ul>464 </div> 465 <div class="footer">466 © <a href="../copyright.html">Copyright</a> 2001 Python Software Foundation.467 <br>468 This page is licensed under the Python Software Foundation License Version 2.469 <br>470 Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.471 <br>472 473 See <a href="/license.html">History and License</a> for more information.<br>474 475 476 <br>477 478 The Python Software Foundation is a non-profit corporation.479<a href="https://www.python.org/psf/donations/">Please donate.</a>480<br>481 <br>482 Last updated on Mar 10, 2026 (08:58 UTC).483 484 <a href="/bugs.html">Found a bug</a>?485 486 <br>487 488 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.489 </div>490 491 </body>492</html>