Skip to content

Commit 456ae33

Browse files
committed
Deploying to gh-pages from @ 0b2c140 🚀
1 parent f5b6556 commit 456ae33

File tree

554 files changed

+631
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

554 files changed

+631
-637
lines changed

_sources/library/importlib.rst.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ Functions
206206
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
207207
a :class:`~importlib.machinery.ModuleSpec`.
208208

209+
.. warning::
210+
This function is not thread-safe. Calling it from multiple threads can result
211+
in unexpected behavior. It's recommended to use the :class:`threading.Lock`
212+
or other synchronization primitives for thread-safe module reloading.
209213

210214
:mod:`importlib.abc` -- Abstract base classes related to import
211215
---------------------------------------------------------------

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<a href="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br>
322322
<br>
323-
最後更新於 7月 16, 2025 (15:58 UTC)。
323+
最後更新於 7月 16, 2025 (17:42 UTC)。
324324

325325
<a href="/bugs.html">Found a bug</a>?
326326

bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<a href="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br>
361361
<br>
362-
最後更新於 7月 16, 2025 (15:58 UTC)。
362+
最後更新於 7月 16, 2025 (17:42 UTC)。
363363

364364
<a href="/bugs.html">Found a bug</a>?
365365

c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br>
331331
<br>
332-
最後更新於 7月 16, 2025 (15:58 UTC)。
332+
最後更新於 7月 16, 2025 (17:42 UTC)。
333333

334334
<a href="/bugs.html">Found a bug</a>?
335335

c-api/allocation.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,14 @@ <h3>瀏覽</h3>
201201
<dt class="sig sig-object c" id="c.PyObject_New">
202202
<span class="sig-name descname"><span class="n"><span class="pre">PyObject_New</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">TYPE</span></span>, <span class="n"><span class="pre">typeobj</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.PyObject_New" title="連結到這個定義"></a><br /></dt>
203203
<dd><p>使用 C 結構型別 <em>TYPE</em> 和 Python 型別物件 <em>typeobj</em> (<code class="docutils literal notranslate"><span class="pre">PyTypeObject*</span></code>) 分配一個新的 Python 物件。未在該 Python 物件標頭 (header) 中定義的欄位不會被初始化;呼叫者會擁有那個對於物件的唯一參照(物件的參照計數為一)。記憶體分配大小由 type 物件的 <a class="reference internal" href="typeobj.html#c.PyTypeObject.tp_basicsize" title="PyTypeObject.tp_basicsize"><code class="xref c c-member docutils literal notranslate"><span class="pre">tp_basicsize</span></code></a> 欄位來指定。</p>
204-
<p>Note that this function is unsuitable if <em>typeobj</em> has
205-
<a class="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><code class="xref c c-macro docutils literal notranslate"><span class="pre">Py_TPFLAGS_HAVE_GC</span></code></a> set. For such objects,
206-
use <a class="reference internal" href="gcsupport.html#c.PyObject_GC_New" title="PyObject_GC_New"><code class="xref c c-func docutils literal notranslate"><span class="pre">PyObject_GC_New()</span></code></a> instead.</p>
204+
<p>注意,如果 <em>typeobj</em><a class="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><code class="xref c c-macro docutils literal notranslate"><span class="pre">Py_TPFLAGS_HAVE_GC</span></code></a> 設定,則此函式不適用。對於這種物件,請改用 <a class="reference internal" href="gcsupport.html#c.PyObject_GC_New" title="PyObject_GC_New"><code class="xref c c-func docutils literal notranslate"><span class="pre">PyObject_GC_New()</span></code></a></p>
207205
</dd></dl>
208206

209207
<dl class="c macro">
210208
<dt class="sig sig-object c" id="c.PyObject_NewVar">
211209
<span class="sig-name descname"><span class="n"><span class="pre">PyObject_NewVar</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">TYPE</span></span>, <span class="n"><span class="pre">typeobj</span></span>, <span class="n"><span class="pre">size</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.PyObject_NewVar" title="連結到這個定義"></a><br /></dt>
212210
<dd><p>使用 C 的結構型別 <em>TYPE</em> 和 Python 的型別物件 <em>typeobj</em> (<code class="docutils literal notranslate"><span class="pre">PyTypeObject*</span></code>) 分配一個新的 Python 物件。未在該 Python 物件標頭中定義的欄位不會被初始化。記憶體空間預留了 <em>TYPE</em> 結構大小再加上 <em>typeobj</em> 物件中 <a class="reference internal" href="typeobj.html#c.PyTypeObject.tp_itemsize" title="PyTypeObject.tp_itemsize"><code class="xref c c-member docutils literal notranslate"><span class="pre">tp_itemsize</span></code></a> 欄位提供的 <em>size</em> (<code class="docutils literal notranslate"><span class="pre">Py_ssize_t</span></code>) 欄位的值。這對於實現如 tuple 這種能夠在建立期間決定自己大小的物件是很實用的。將欄位的陣列嵌入到相同的記憶體分配中可以減少記憶體分配的次數,這提高了記憶體管理的效率。</p>
213-
<p>Note that this function is unsuitable if <em>typeobj</em> has
214-
<a class="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><code class="xref c c-macro docutils literal notranslate"><span class="pre">Py_TPFLAGS_HAVE_GC</span></code></a> set. For such objects,
215-
use <a class="reference internal" href="gcsupport.html#c.PyObject_GC_NewVar" title="PyObject_GC_NewVar"><code class="xref c c-func docutils literal notranslate"><span class="pre">PyObject_GC_NewVar()</span></code></a> instead.</p>
211+
<p>注意,如果 <em>typeobj</em><a class="reference internal" href="typeobj.html#c.Py_TPFLAGS_HAVE_GC" title="Py_TPFLAGS_HAVE_GC"><code class="xref c c-macro docutils literal notranslate"><span class="pre">Py_TPFLAGS_HAVE_GC</span></code></a> 設定,則此函式不適用。對於這種物件,請改用 <a class="reference internal" href="gcsupport.html#c.PyObject_GC_NewVar" title="PyObject_GC_NewVar"><code class="xref c c-func docutils literal notranslate"><span class="pre">PyObject_GC_NewVar()</span></code></a></p>
216212
</dd></dl>
217213

218214
<dl class="c function">
@@ -350,7 +346,7 @@ <h3>瀏覽</h3>
350346
<a href="https://www.python.org/psf/donations/">Please donate.</a>
351347
<br>
352348
<br>
353-
最後更新於 7月 16, 2025 (15:58 UTC)。
349+
最後更新於 7月 16, 2025 (17:42 UTC)。
354350

355351
<a href="/bugs.html">Found a bug</a>?
356352

c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>瀏覽</h3>
376376
<a href="https://www.python.org/psf/donations/">Please donate.</a>
377377
<br>
378378
<br>
379-
最後更新於 7月 16, 2025 (15:58 UTC)。
379+
最後更新於 7月 16, 2025 (17:42 UTC)。
380380

381381
<a href="/bugs.html">Found a bug</a>?
382382

c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ <h3>瀏覽</h3>
931931
<a href="https://www.python.org/psf/donations/">Please donate.</a>
932932
<br>
933933
<br>
934-
最後更新於 7月 16, 2025 (15:58 UTC)。
934+
最後更新於 7月 16, 2025 (17:42 UTC)。
935935

936936
<a href="/bugs.html">Found a bug</a>?
937937

c-api/bool.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ <h3>瀏覽</h3>
179179
<dl class="c var">
180180
<dt class="sig sig-object c" id="c.PyBool_Type">
181181
<a class="reference internal" href="type.html#c.PyTypeObject" title="PyTypeObject"><span class="n"><span class="pre">PyTypeObject</span></span></a><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PyBool_Type</span></span></span><a class="headerlink" href="#c.PyBool_Type" title="連結到這個定義"></a><br /></dt>
182-
<dd><em class="stableabi"><a class="reference internal" href="stable.html#stable"><span class="std std-ref">穩定 ABI 的一部分</span></a>.</em><p>This instance of <a class="reference internal" href="type.html#c.PyTypeObject" title="PyTypeObject"><code class="xref c c-type docutils literal notranslate"><span class="pre">PyTypeObject</span></code></a> represents the Python boolean type; it
183-
is the same object as <a class="reference internal" href="../library/functions.html#bool" title="bool"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a> in the Python layer.</p>
182+
<dd><em class="stableabi"><a class="reference internal" href="stable.html#stable"><span class="std std-ref">穩定 ABI 的一部分</span></a>.</em><p><a class="reference internal" href="type.html#c.PyTypeObject" title="PyTypeObject"><code class="xref c c-type docutils literal notranslate"><span class="pre">PyTypeObject</span></code></a> 實例代表 Python 的布林型別;它與 Python 層級中的 <a class="reference internal" href="../library/functions.html#bool" title="bool"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a> 是同一個物件。</p>
184183
</dd></dl>
185184

186185
<dl class="c function">
@@ -341,7 +340,7 @@ <h3>瀏覽</h3>
341340
<a href="https://www.python.org/psf/donations/">Please donate.</a>
342341
<br>
343342
<br>
344-
最後更新於 7月 16, 2025 (15:58 UTC)。
343+
最後更新於 7月 16, 2025 (17:42 UTC)。
345344

346345
<a href="/bugs.html">Found a bug</a>?
347346

c-api/buffer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ <h3>瀏覽</h3>
10221022
<a href="https://www.python.org/psf/donations/">Please donate.</a>
10231023
<br>
10241024
<br>
1025-
最後更新於 7月 16, 2025 (15:58 UTC)。
1025+
最後更新於 7月 16, 2025 (17:42 UTC)。
10261026

10271027
<a href="/bugs.html">Found a bug</a>?
10281028

c-api/bytearray.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ <h3>瀏覽</h3>
400400
<a href="https://www.python.org/psf/donations/">Please donate.</a>
401401
<br>
402402
<br>
403-
最後更新於 7月 16, 2025 (15:58 UTC)。
403+
最後更新於 7月 16, 2025 (17:42 UTC)。
404404

405405
<a href="/bugs.html">Found a bug</a>?
406406

0 commit comments

Comments
 (0)