gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

301 line
11KB

  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="./">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Search &#8212; Python 3.12.3 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
  8. <link rel="stylesheet" type="text/css" href="_static/pydoctheme.css?v=bb723527" />
  9. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="_static/pygments_dark.css?v=b20cc3f5" />
  10. <script src="_static/documentation_options.js?v=2c828074"></script>
  11. <script src="_static/doctools.js?v=888ff710"></script>
  12. <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
  13. <script src="_static/sidebar.js"></script>
  14. <script src="_static/searchtools.js"></script>
  15. <script src="_static/language_data.js"></script>
  16. <link rel="search" type="application/opensearchdescription+xml"
  17. title="Search within Python 3.12.3 documentation"
  18. href="_static/opensearch.xml"/>
  19. <link rel="author" title="About these documents" href="about.html" />
  20. <link rel="index" title="Index" href="genindex.html" />
  21. <link rel="search" title="Search" href="#" />
  22. <link rel="copyright" title="Copyright" href="copyright.html" />
  23. <script src="searchindex.js" defer></script>
  24. <link rel="canonical" href="https://docs.python.org/3/search.html" />
  25. <style>
  26. @media only screen {
  27. table.full-width-table {
  28. width: 100%;
  29. }
  30. }
  31. </style>
  32. <link rel="stylesheet" href="_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  33. <link rel="shortcut icon" type="image/png" href="_static/py.svg" />
  34. <script type="text/javascript" src="_static/copybutton.js"></script>
  35. <script type="text/javascript" src="_static/menu.js"></script>
  36. <script type="text/javascript" src="_static/search-focus.js"></script>
  37. <script type="text/javascript" src="_static/themetoggle.js"></script>
  38. <meta name="robots" content="noindex">
  39. <script type="text/javascript">
  40. const GLOSSARY_PAGE = 'glossary.html';
  41. document.addEventListener('DOMContentLoaded', function() {
  42. fetch('_static/glossary.json')
  43. .then(function(response) {
  44. if (response.ok) {
  45. return response.json();
  46. } else {
  47. throw new Error('Failed to fetch glossary.json');
  48. }
  49. })
  50. .then(function(glossary) {
  51. const RESULT_TEMPLATE = '<div style="display: none" class="admonition seealso" id="glossary-result">' +
  52. ' <p class="topic-title">' +
  53. ' <a class="glossary-title" href="#"></a>' +
  54. ' </p>' +
  55. ' <div class="glossary-body"></div>' +
  56. '</div>';
  57. let searchResults = document.getElementById('search-results');
  58. searchResults.insertAdjacentHTML('afterbegin', RESULT_TEMPLATE);
  59. const params = new URLSearchParams(document.location.search).get("q");
  60. if (params) {
  61. const searchParam = params.toLowerCase();
  62. const glossaryItem = glossary[searchParam];
  63. if (glossaryItem) {
  64. let resultDiv = document.getElementById('glossary-result');
  65. // set up the title text with a link to the glossary page
  66. let glossaryTitle = resultDiv.querySelector('.glossary-title');
  67. glossaryTitle.textContent = 'Glossary: ' + glossaryItem.title;
  68. const linkTarget = searchParam.replace(/ /g, '-');
  69. glossaryTitle.href = GLOSSARY_PAGE + '#term-' + linkTarget;
  70. // rewrite any anchor links (to other glossary terms)
  71. // to have a full reference to the glossary page
  72. let body = document.createElement('div');
  73. body.innerHTML = glossaryItem.body;
  74. const anchorLinks = body.querySelectorAll('a[href^="#"]');
  75. anchorLinks.forEach(function(link) {
  76. const currentUrl = link.getAttribute('href');
  77. link.href = GLOSSARY_PAGE + currentUrl;
  78. });
  79. resultDiv.querySelector('.glossary-body').appendChild(body);
  80. resultDiv.style.display = '';
  81. } else {
  82. document.getElementById('glossary-result').style.display = 'none';
  83. }
  84. }
  85. })
  86. .catch(function(error) {
  87. console.error(error);
  88. });
  89. });
  90. </script>
  91. </head>
  92. <body>
  93. <div class="mobile-nav">
  94. <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
  95. aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
  96. <nav class="nav-content" role="navigation">
  97. <label for="menuToggler" class="toggler__label">
  98. <span></span>
  99. </label>
  100. <span class="nav-items-wrapper">
  101. <a href="https://www.python.org/" class="nav-logo">
  102. <img src="_static/py.svg" alt="Python logo"/>
  103. </a>
  104. <span class="version_switcher_placeholder"></span>
  105. </span>
  106. </nav>
  107. <div class="menu-wrapper">
  108. <nav class="menu" role="navigation" aria-label="main navigation">
  109. <div class="language_switcher_placeholder"></div>
  110. <label class="theme-selector-label">
  111. Theme
  112. <select class="theme-selector" oninput="activateTheme(this.value)">
  113. <option value="auto" selected>Auto</option>
  114. <option value="light">Light</option>
  115. <option value="dark">Dark</option>
  116. </select>
  117. </label>
  118. </nav>
  119. </div>
  120. </div>
  121. <div class="related" role="navigation" aria-label="related navigation">
  122. <h3>Navigation</h3>
  123. <ul>
  124. <li class="right" style="margin-right: 10px">
  125. <a href="genindex.html" title="General Index"
  126. accesskey="I">index</a></li>
  127. <li class="right" >
  128. <a href="py-modindex.html" title="Python Module Index"
  129. >modules</a> |</li>
  130. <li><img src="_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  131. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  132. <li class="switchers">
  133. <div class="language_switcher_placeholder"></div>
  134. <div class="version_switcher_placeholder"></div>
  135. </li>
  136. <li>
  137. </li>
  138. <li id="cpython-language-and-version">
  139. <a href="index.html">3.12.3 Documentation</a> &#187;
  140. </li>
  141. <li class="nav-item nav-item-this"><a href="">Search</a></li>
  142. <li class="right">
  143. <label class="theme-selector-label">
  144. Theme
  145. <select class="theme-selector" oninput="activateTheme(this.value)">
  146. <option value="auto" selected>Auto</option>
  147. <option value="light">Light</option>
  148. <option value="dark">Dark</option>
  149. </select>
  150. </label> |</li>
  151. </ul>
  152. </div>
  153. <div class="document">
  154. <div class="documentwrapper">
  155. <div class="bodywrapper">
  156. <div class="body" role="main">
  157. <h1 id="search-documentation">Search</h1>
  158. <noscript>
  159. <div class="admonition warning">
  160. <p>
  161. Please activate JavaScript to enable the search
  162. functionality.
  163. </p>
  164. </div>
  165. </noscript>
  166. <p>
  167. Searching for multiple words only shows matches that contain
  168. all words.
  169. </p>
  170. <form action="" method="get">
  171. <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  172. <input type="submit" value="search" />
  173. <span id="search-progress" style="padding-left: 10px"></span>
  174. </form>
  175. <div id="search-results">
  176. </div>
  177. <div class="clearer"></div>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  182. <div class="sphinxsidebarwrapper">
  183. </div>
  184. <div id="sidebarbutton" title="Collapse sidebar">
  185. <span>«</span>
  186. </div>
  187. </div>
  188. <div class="clearer"></div>
  189. </div>
  190. <div class="related" role="navigation" aria-label="related navigation">
  191. <h3>Navigation</h3>
  192. <ul>
  193. <li class="right" style="margin-right: 10px">
  194. <a href="genindex.html" title="General Index"
  195. >index</a></li>
  196. <li class="right" >
  197. <a href="py-modindex.html" title="Python Module Index"
  198. >modules</a> |</li>
  199. <li><img src="_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  200. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  201. <li class="switchers">
  202. <div class="language_switcher_placeholder"></div>
  203. <div class="version_switcher_placeholder"></div>
  204. </li>
  205. <li>
  206. </li>
  207. <li id="cpython-language-and-version">
  208. <a href="index.html">3.12.3 Documentation</a> &#187;
  209. </li>
  210. <li class="nav-item nav-item-this"><a href="">Search</a></li>
  211. <li class="right">
  212. <label class="theme-selector-label">
  213. Theme
  214. <select class="theme-selector" oninput="activateTheme(this.value)">
  215. <option value="auto" selected>Auto</option>
  216. <option value="light">Light</option>
  217. <option value="dark">Dark</option>
  218. </select>
  219. </label> |</li>
  220. </ul>
  221. </div>
  222. <div class="footer">
  223. &copy;
  224. <a href="copyright.html">
  225. Copyright
  226. </a>
  227. 2001-2024, Python Software Foundation.
  228. <br />
  229. This page is licensed under the Python Software Foundation License Version 2.
  230. <br />
  231. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  232. <br />
  233. See <a href="/license.html">History and License</a> for more information.<br />
  234. <br />
  235. The Python Software Foundation is a non-profit corporation.
  236. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  237. <br />
  238. <br />
  239. Last updated on Apr 09, 2024 (13:47 UTC).
  240. <a href="/bugs.html">Found a bug</a>?
  241. <br />
  242. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  243. </div>
  244. </body>
  245. </html>
上海开阖软件有限公司 沪ICP备12045867号-1