gooderp18绿色标准版
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

424 rindas
27KB

  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" /><meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <meta property="og:title" content="marshal — Internal Python object serialization" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/library/marshal.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="This module contains functions that can read and write Python values in a binary format. The format is specific to Python, but independent of machine architecture issues (e.g., you can write a Pyth..." />
  11. <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
  12. <meta property="og:image:alt" content="Python documentation" />
  13. <meta name="description" content="This module contains functions that can read and write Python values in a binary format. The format is specific to Python, but independent of machine architecture issues (e.g., you can write a Pyth..." />
  14. <meta property="og:image:width" content="200" />
  15. <meta property="og:image:height" content="200" />
  16. <meta name="theme-color" content="#3776ab" />
  17. <title>marshal — Internal Python object serialization &#8212; Python 3.12.3 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
  19. <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=bb723527" />
  20. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=b20cc3f5" />
  21. <script src="../_static/documentation_options.js?v=2c828074"></script>
  22. <script src="../_static/doctools.js?v=888ff710"></script>
  23. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  24. <script src="../_static/sidebar.js"></script>
  25. <link rel="search" type="application/opensearchdescription+xml"
  26. title="Search within Python 3.12.3 documentation"
  27. href="../_static/opensearch.xml"/>
  28. <link rel="author" title="About these documents" href="../about.html" />
  29. <link rel="index" title="Index" href="../genindex.html" />
  30. <link rel="search" title="Search" href="../search.html" />
  31. <link rel="copyright" title="Copyright" href="../copyright.html" />
  32. <link rel="next" title="dbm — Interfaces to Unix “databases”" href="dbm.html" />
  33. <link rel="prev" title="shelve — Python object persistence" href="shelve.html" />
  34. <link rel="canonical" href="https://docs.python.org/3/library/marshal.html" />
  35. <style>
  36. @media only screen {
  37. table.full-width-table {
  38. width: 100%;
  39. }
  40. }
  41. </style>
  42. <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  43. <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
  44. <script type="text/javascript" src="../_static/copybutton.js"></script>
  45. <script type="text/javascript" src="../_static/menu.js"></script>
  46. <script type="text/javascript" src="../_static/search-focus.js"></script>
  47. <script type="text/javascript" src="../_static/themetoggle.js"></script>
  48. </head>
  49. <body>
  50. <div class="mobile-nav">
  51. <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
  52. aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
  53. <nav class="nav-content" role="navigation">
  54. <label for="menuToggler" class="toggler__label">
  55. <span></span>
  56. </label>
  57. <span class="nav-items-wrapper">
  58. <a href="https://www.python.org/" class="nav-logo">
  59. <img src="../_static/py.svg" alt="Python logo"/>
  60. </a>
  61. <span class="version_switcher_placeholder"></span>
  62. <form role="search" class="search" action="../search.html" method="get">
  63. <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
  64. <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>
  65. </svg>
  66. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  67. <input type="submit" value="Go"/>
  68. </form>
  69. </span>
  70. </nav>
  71. <div class="menu-wrapper">
  72. <nav class="menu" role="navigation" aria-label="main navigation">
  73. <div class="language_switcher_placeholder"></div>
  74. <label class="theme-selector-label">
  75. Theme
  76. <select class="theme-selector" oninput="activateTheme(this.value)">
  77. <option value="auto" selected>Auto</option>
  78. <option value="light">Light</option>
  79. <option value="dark">Dark</option>
  80. </select>
  81. </label>
  82. <div>
  83. <h4>Previous topic</h4>
  84. <p class="topless"><a href="shelve.html"
  85. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">shelve</span></code> — Python object persistence</a></p>
  86. </div>
  87. <div>
  88. <h4>Next topic</h4>
  89. <p class="topless"><a href="dbm.html"
  90. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dbm</span></code> — Interfaces to Unix “databases”</a></p>
  91. </div>
  92. <div role="note" aria-label="source link">
  93. <h3>This Page</h3>
  94. <ul class="this-page-menu">
  95. <li><a href="../bugs.html">Report a Bug</a></li>
  96. <li>
  97. <a href="https://github.com/python/cpython/blob/main/Doc/library/marshal.rst"
  98. rel="nofollow">Show Source
  99. </a>
  100. </li>
  101. </ul>
  102. </div>
  103. </nav>
  104. </div>
  105. </div>
  106. <div class="related" role="navigation" aria-label="related navigation">
  107. <h3>Navigation</h3>
  108. <ul>
  109. <li class="right" style="margin-right: 10px">
  110. <a href="../genindex.html" title="General Index"
  111. accesskey="I">index</a></li>
  112. <li class="right" >
  113. <a href="../py-modindex.html" title="Python Module Index"
  114. >modules</a> |</li>
  115. <li class="right" >
  116. <a href="dbm.html" title="dbm — Interfaces to Unix “databases”"
  117. accesskey="N">next</a> |</li>
  118. <li class="right" >
  119. <a href="shelve.html" title="shelve — Python object persistence"
  120. accesskey="P">previous</a> |</li>
  121. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  122. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  123. <li class="switchers">
  124. <div class="language_switcher_placeholder"></div>
  125. <div class="version_switcher_placeholder"></div>
  126. </li>
  127. <li>
  128. </li>
  129. <li id="cpython-language-and-version">
  130. <a href="../index.html">3.12.3 Documentation</a> &#187;
  131. </li>
  132. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  133. <li class="nav-item nav-item-2"><a href="persistence.html" accesskey="U">Data Persistence</a> &#187;</li>
  134. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code> — Internal Python object serialization</a></li>
  135. <li class="right">
  136. <div class="inline-search" role="search">
  137. <form class="inline-search" action="../search.html" method="get">
  138. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  139. <input type="submit" value="Go" />
  140. </form>
  141. </div>
  142. |
  143. </li>
  144. <li class="right">
  145. <label class="theme-selector-label">
  146. Theme
  147. <select class="theme-selector" oninput="activateTheme(this.value)">
  148. <option value="auto" selected>Auto</option>
  149. <option value="light">Light</option>
  150. <option value="dark">Dark</option>
  151. </select>
  152. </label> |</li>
  153. </ul>
  154. </div>
  155. <div class="document">
  156. <div class="documentwrapper">
  157. <div class="bodywrapper">
  158. <div class="body" role="main">
  159. <section id="module-marshal">
  160. <span id="marshal-internal-python-object-serialization"></span><h1><a class="reference internal" href="#module-marshal" title="marshal: Convert Python objects to streams of bytes and back (with different constraints)."><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code></a> — Internal Python object serialization<a class="headerlink" href="#module-marshal" title="Link to this heading">¶</a></h1>
  161. <hr class="docutils" />
  162. <p>This module contains functions that can read and write Python values in a binary
  163. format. The format is specific to Python, but independent of machine
  164. architecture issues (e.g., you can write a Python value to a file on a PC,
  165. transport the file to a Sun, and read it back there). Details of the format are
  166. undocumented on purpose; it may change between Python versions (although it
  167. rarely does). <a class="footnote-reference brackets" href="#id2" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
  168. <p id="index-0">This is not a general “persistence” module. For general persistence and
  169. transfer of Python objects through RPC calls, see the modules <a class="reference internal" href="pickle.html#module-pickle" title="pickle: Convert Python objects to streams of bytes and back."><code class="xref py py-mod docutils literal notranslate"><span class="pre">pickle</span></code></a> and
  170. <a class="reference internal" href="shelve.html#module-shelve" title="shelve: Python object persistence."><code class="xref py py-mod docutils literal notranslate"><span class="pre">shelve</span></code></a>. The <a class="reference internal" href="#module-marshal" title="marshal: Convert Python objects to streams of bytes and back (with different constraints)."><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code></a> module exists mainly to support reading and
  171. writing the “pseudo-compiled” code for Python modules of <code class="file docutils literal notranslate"><span class="pre">.pyc</span></code> files.
  172. Therefore, the Python maintainers reserve the right to modify the marshal format
  173. in backward incompatible ways should the need arise. If you’re serializing and
  174. de-serializing Python objects, use the <a class="reference internal" href="pickle.html#module-pickle" title="pickle: Convert Python objects to streams of bytes and back."><code class="xref py py-mod docutils literal notranslate"><span class="pre">pickle</span></code></a> module instead – the
  175. performance is comparable, version independence is guaranteed, and pickle
  176. supports a substantially wider range of objects than marshal.</p>
  177. <div class="admonition warning">
  178. <p class="admonition-title">Warning</p>
  179. <p>The <a class="reference internal" href="#module-marshal" title="marshal: Convert Python objects to streams of bytes and back (with different constraints)."><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code></a> module is not intended to be secure against erroneous or
  180. maliciously constructed data. Never unmarshal data received from an
  181. untrusted or unauthenticated source.</p>
  182. </div>
  183. <p id="index-1">Not all Python object types are supported; in general, only objects whose value
  184. is independent from a particular invocation of Python can be written and read by
  185. this module. The following types are supported: booleans, integers, floating
  186. point numbers, complex numbers, strings, bytes, bytearrays, tuples, lists, sets,
  187. frozensets, dictionaries, and code objects, where it should be understood that
  188. tuples, lists, sets, frozensets and dictionaries are only supported as long as
  189. the values contained therein are themselves supported. The
  190. singletons <a class="reference internal" href="constants.html#None" title="None"><code class="xref py py-const docutils literal notranslate"><span class="pre">None</span></code></a>, <a class="reference internal" href="constants.html#Ellipsis" title="Ellipsis"><code class="xref py py-const docutils literal notranslate"><span class="pre">Ellipsis</span></code></a> and <a class="reference internal" href="exceptions.html#StopIteration" title="StopIteration"><code class="xref py py-exc docutils literal notranslate"><span class="pre">StopIteration</span></code></a> can also be
  191. marshalled and unmarshalled.
  192. For format <em>version</em> lower than 3, recursive lists, sets and dictionaries cannot
  193. be written (see below).</p>
  194. <p>There are functions that read/write files as well as functions operating on
  195. bytes-like objects.</p>
  196. <p>The module defines these functions:</p>
  197. <dl class="py function">
  198. <dt class="sig sig-object py" id="marshal.dump">
  199. <span class="sig-prename descclassname"><span class="pre">marshal.</span></span><span class="sig-name descname"><span class="pre">dump</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">version</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#marshal.dump" title="Link to this definition">¶</a></dt>
  200. <dd><p>Write the value on the open file. The value must be a supported type. The
  201. file must be a writeable <a class="reference internal" href="../glossary.html#term-binary-file"><span class="xref std std-term">binary file</span></a>.</p>
  202. <p>If the value has (or contains an object that has) an unsupported type, a
  203. <a class="reference internal" href="exceptions.html#ValueError" title="ValueError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a> exception is raised — but garbage data will also be written
  204. to the file. The object will not be properly read back by <a class="reference internal" href="#marshal.load" title="marshal.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">load()</span></code></a>.</p>
  205. <p>The <em>version</em> argument indicates the data format that <code class="docutils literal notranslate"><span class="pre">dump</span></code> should use
  206. (see below).</p>
  207. <p class="audit-hook">Raises an <a class="reference internal" href="sys.html#auditing"><span class="std std-ref">auditing event</span></a> <code class="docutils literal notranslate"><span class="pre">marshal.dumps</span></code> with arguments <code class="docutils literal notranslate"><span class="pre">value</span></code>, <code class="docutils literal notranslate"><span class="pre">version</span></code>.</p>
  208. </dd></dl>
  209. <dl class="py function">
  210. <dt class="sig sig-object py" id="marshal.load">
  211. <span class="sig-prename descclassname"><span class="pre">marshal.</span></span><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#marshal.load" title="Link to this definition">¶</a></dt>
  212. <dd><p>Read one value from the open file and return it. If no valid value is read
  213. (e.g. because the data has a different Python version’s incompatible marshal
  214. format), raise <a class="reference internal" href="exceptions.html#EOFError" title="EOFError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">EOFError</span></code></a>, <a class="reference internal" href="exceptions.html#ValueError" title="ValueError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a> or <a class="reference internal" href="exceptions.html#TypeError" title="TypeError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TypeError</span></code></a>. The
  215. file must be a readable <a class="reference internal" href="../glossary.html#term-binary-file"><span class="xref std std-term">binary file</span></a>.</p>
  216. <p class="audit-hook">Raises an <a class="reference internal" href="sys.html#auditing"><span class="std std-ref">auditing event</span></a> <code class="docutils literal notranslate"><span class="pre">marshal.load</span></code> with no arguments.</p>
  217. <div class="admonition note">
  218. <p class="admonition-title">Note</p>
  219. <p>If an object containing an unsupported type was marshalled with <a class="reference internal" href="#marshal.dump" title="marshal.dump"><code class="xref py py-func docutils literal notranslate"><span class="pre">dump()</span></code></a>,
  220. <a class="reference internal" href="#marshal.load" title="marshal.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">load()</span></code></a> will substitute <code class="docutils literal notranslate"><span class="pre">None</span></code> for the unmarshallable type.</p>
  221. </div>
  222. <div class="versionchanged">
  223. <p><span class="versionmodified changed">Changed in version 3.10: </span>This call used to raise a <code class="docutils literal notranslate"><span class="pre">code.__new__</span></code> audit event for each code object. Now
  224. it raises a single <code class="docutils literal notranslate"><span class="pre">marshal.load</span></code> event for the entire load operation.</p>
  225. </div>
  226. </dd></dl>
  227. <dl class="py function">
  228. <dt class="sig sig-object py" id="marshal.dumps">
  229. <span class="sig-prename descclassname"><span class="pre">marshal.</span></span><span class="sig-name descname"><span class="pre">dumps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">version</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#marshal.dumps" title="Link to this definition">¶</a></dt>
  230. <dd><p>Return the bytes object that would be written to a file by <code class="docutils literal notranslate"><span class="pre">dump(value,</span> <span class="pre">file)</span></code>. The
  231. value must be a supported type. Raise a <a class="reference internal" href="exceptions.html#ValueError" title="ValueError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a> exception if value
  232. has (or contains an object that has) an unsupported type.</p>
  233. <p>The <em>version</em> argument indicates the data format that <code class="docutils literal notranslate"><span class="pre">dumps</span></code> should use
  234. (see below).</p>
  235. <p class="audit-hook">Raises an <a class="reference internal" href="sys.html#auditing"><span class="std std-ref">auditing event</span></a> <code class="docutils literal notranslate"><span class="pre">marshal.dumps</span></code> with arguments <code class="docutils literal notranslate"><span class="pre">value</span></code>, <code class="docutils literal notranslate"><span class="pre">version</span></code>.</p>
  236. </dd></dl>
  237. <dl class="py function">
  238. <dt class="sig sig-object py" id="marshal.loads">
  239. <span class="sig-prename descclassname"><span class="pre">marshal.</span></span><span class="sig-name descname"><span class="pre">loads</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bytes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#marshal.loads" title="Link to this definition">¶</a></dt>
  240. <dd><p>Convert the <a class="reference internal" href="../glossary.html#term-bytes-like-object"><span class="xref std std-term">bytes-like object</span></a> to a value. If no valid value is found, raise
  241. <a class="reference internal" href="exceptions.html#EOFError" title="EOFError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">EOFError</span></code></a>, <a class="reference internal" href="exceptions.html#ValueError" title="ValueError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a> or <a class="reference internal" href="exceptions.html#TypeError" title="TypeError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TypeError</span></code></a>. Extra bytes in the
  242. input are ignored.</p>
  243. <p class="audit-hook">Raises an <a class="reference internal" href="sys.html#auditing"><span class="std std-ref">auditing event</span></a> <code class="docutils literal notranslate"><span class="pre">marshal.loads</span></code> with argument <code class="docutils literal notranslate"><span class="pre">bytes</span></code>.</p>
  244. <div class="versionchanged">
  245. <p><span class="versionmodified changed">Changed in version 3.10: </span>This call used to raise a <code class="docutils literal notranslate"><span class="pre">code.__new__</span></code> audit event for each code object. Now
  246. it raises a single <code class="docutils literal notranslate"><span class="pre">marshal.loads</span></code> event for the entire load operation.</p>
  247. </div>
  248. </dd></dl>
  249. <p>In addition, the following constants are defined:</p>
  250. <dl class="py data">
  251. <dt class="sig sig-object py" id="marshal.version">
  252. <span class="sig-prename descclassname"><span class="pre">marshal.</span></span><span class="sig-name descname"><span class="pre">version</span></span><a class="headerlink" href="#marshal.version" title="Link to this definition">¶</a></dt>
  253. <dd><p>Indicates the format that the module uses. Version 0 is the historical
  254. format, version 1 shares interned strings and version 2 uses a binary format
  255. for floating point numbers.
  256. Version 3 adds support for object instancing and recursion.
  257. The current version is 4.</p>
  258. </dd></dl>
  259. <p class="rubric">Footnotes</p>
  260. <aside class="footnote-list brackets">
  261. <aside class="footnote brackets" id="id2" role="doc-footnote">
  262. <span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id1">1</a><span class="fn-bracket">]</span></span>
  263. <p>The name of this module stems from a bit of terminology used by the designers of
  264. Modula-3 (amongst others), who use the term “marshalling” for shipping of data
  265. around in a self-contained form. Strictly speaking, “to marshal” means to
  266. convert some data from internal to external form (in an RPC buffer for instance)
  267. and “unmarshalling” for the reverse process.</p>
  268. </aside>
  269. </aside>
  270. </section>
  271. <div class="clearer"></div>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  276. <div class="sphinxsidebarwrapper">
  277. <div>
  278. <h4>Previous topic</h4>
  279. <p class="topless"><a href="shelve.html"
  280. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">shelve</span></code> — Python object persistence</a></p>
  281. </div>
  282. <div>
  283. <h4>Next topic</h4>
  284. <p class="topless"><a href="dbm.html"
  285. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">dbm</span></code> — Interfaces to Unix “databases”</a></p>
  286. </div>
  287. <div role="note" aria-label="source link">
  288. <h3>This Page</h3>
  289. <ul class="this-page-menu">
  290. <li><a href="../bugs.html">Report a Bug</a></li>
  291. <li>
  292. <a href="https://github.com/python/cpython/blob/main/Doc/library/marshal.rst"
  293. rel="nofollow">Show Source
  294. </a>
  295. </li>
  296. </ul>
  297. </div>
  298. </div>
  299. <div id="sidebarbutton" title="Collapse sidebar">
  300. <span>«</span>
  301. </div>
  302. </div>
  303. <div class="clearer"></div>
  304. </div>
  305. <div class="related" role="navigation" aria-label="related navigation">
  306. <h3>Navigation</h3>
  307. <ul>
  308. <li class="right" style="margin-right: 10px">
  309. <a href="../genindex.html" title="General Index"
  310. >index</a></li>
  311. <li class="right" >
  312. <a href="../py-modindex.html" title="Python Module Index"
  313. >modules</a> |</li>
  314. <li class="right" >
  315. <a href="dbm.html" title="dbm — Interfaces to Unix “databases”"
  316. >next</a> |</li>
  317. <li class="right" >
  318. <a href="shelve.html" title="shelve — Python object persistence"
  319. >previous</a> |</li>
  320. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  321. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  322. <li class="switchers">
  323. <div class="language_switcher_placeholder"></div>
  324. <div class="version_switcher_placeholder"></div>
  325. </li>
  326. <li>
  327. </li>
  328. <li id="cpython-language-and-version">
  329. <a href="../index.html">3.12.3 Documentation</a> &#187;
  330. </li>
  331. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  332. <li class="nav-item nav-item-2"><a href="persistence.html" >Data Persistence</a> &#187;</li>
  333. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">marshal</span></code> — Internal Python object serialization</a></li>
  334. <li class="right">
  335. <div class="inline-search" role="search">
  336. <form class="inline-search" action="../search.html" method="get">
  337. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  338. <input type="submit" value="Go" />
  339. </form>
  340. </div>
  341. |
  342. </li>
  343. <li class="right">
  344. <label class="theme-selector-label">
  345. Theme
  346. <select class="theme-selector" oninput="activateTheme(this.value)">
  347. <option value="auto" selected>Auto</option>
  348. <option value="light">Light</option>
  349. <option value="dark">Dark</option>
  350. </select>
  351. </label> |</li>
  352. </ul>
  353. </div>
  354. <div class="footer">
  355. &copy;
  356. <a href="../copyright.html">
  357. Copyright
  358. </a>
  359. 2001-2024, Python Software Foundation.
  360. <br />
  361. This page is licensed under the Python Software Foundation License Version 2.
  362. <br />
  363. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  364. <br />
  365. See <a href="/license.html">History and License</a> for more information.<br />
  366. <br />
  367. The Python Software Foundation is a non-profit corporation.
  368. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  369. <br />
  370. <br />
  371. Last updated on Apr 09, 2024 (13:47 UTC).
  372. <a href="/bugs.html">Found a bug</a>?
  373. <br />
  374. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  375. </div>
  376. </body>
  377. </html>
上海开阖软件有限公司 沪ICP备12045867号-1