Skip to content

Commit 9939841

Browse files
committed
Deploying to gh-pages from @ 2adc9e1 🚀
1 parent 7cb810f commit 9939841

File tree

570 files changed

+721
-954
lines changed

Some content is hidden

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

570 files changed

+721
-954
lines changed

_sources/c-api/module.rst.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Module Objects
1313
.. index:: single: ModuleType (in module types)
1414

1515
This instance of :c:type:`PyTypeObject` represents the Python module type. This
16-
is exposed to Python programs as ``types.ModuleType``.
16+
is exposed to Python programs as :py:class:`types.ModuleType`.
1717

1818

1919
.. c:function:: int PyModule_Check(PyObject *p)
@@ -71,6 +71,9 @@ Module Objects
7171
``PyObject_*`` functions rather than directly manipulate a module's
7272
:attr:`~object.__dict__`.
7373
74+
The returned reference is borrowed from the module; it is valid until
75+
the module is destroyed.
76+
7477
7578
.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module)
7679
@@ -90,6 +93,10 @@ Module Objects
9093
Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to
9194
``'utf-8'``.
9295
96+
The returned buffer is only valid until the module is renamed or destroyed.
97+
Note that Python code may rename a module by setting its :py:attr:`~module.__name__`
98+
attribute.
99+
93100
.. c:function:: void* PyModule_GetState(PyObject *module)
94101
95102
Return the "state" of the module, that is, a pointer to the block of memory
@@ -126,6 +133,9 @@ Module Objects
126133
Similar to :c:func:`PyModule_GetFilenameObject` but return the filename
127134
encoded to 'utf-8'.
128135
136+
The returned buffer is only valid until the module's :py:attr:`~module.__file__` attribute
137+
is reassigned or the module is destroyed.
138+
129139
.. deprecated:: 3.2
130140
:c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on
131141
unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead.
@@ -649,6 +659,9 @@ or code that creates modules dynamically.
649659
:c:type:`PyMethodDef` arrays; in that case they should call this function
650660
directly.
651661
662+
The *functions* array must be statically allocated (or otherwise guaranteed
663+
to outlive the module object).
664+
652665
.. versionadded:: 3.5
653666
654667
.. c:function:: int PyModule_SetDocString(PyObject *module, const char *docstring)

about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ <h3>導航</h3>
314314
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
315315
<br>
316316
<br>
317-
最後更新於 11月 07, 2025 (10:25 UTC)。
317+
最後更新於 11月 07, 2025 (13:42 UTC)。
318318

319319
<a href="/bugs.html">發現 bug</a>
320320

bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ <h3>導航</h3>
351351
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
352352
<br>
353353
<br>
354-
最後更新於 11月 07, 2025 (10:25 UTC)。
354+
最後更新於 11月 07, 2025 (13:42 UTC)。
355355

356356
<a href="/bugs.html">發現 bug</a>
357357

c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ <h3>導航</h3>
323323
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
324324
<br>
325325
<br>
326-
最後更新於 11月 07, 2025 (10:25 UTC)。
326+
最後更新於 11月 07, 2025 (13:42 UTC)。
327327

328328
<a href="/bugs.html">發現 bug</a>
329329

c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ <h3>導航</h3>
432432
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
433433
<br>
434434
<br>
435-
最後更新於 11月 07, 2025 (10:25 UTC)。
435+
最後更新於 11月 07, 2025 (13:42 UTC)。
436436

437437
<a href="/bugs.html">發現 bug</a>
438438

c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ <h3>導航</h3>
471471
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
472472
<br>
473473
<br>
474-
最後更新於 11月 07, 2025 (10:25 UTC)。
474+
最後更新於 11月 07, 2025 (13:42 UTC)。
475475

476476
<a href="/bugs.html">發現 bug</a>
477477

c-api/arg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ <h3>導航</h3>
954954
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
955955
<br>
956956
<br>
957-
最後更新於 11月 07, 2025 (10:25 UTC)。
957+
最後更新於 11月 07, 2025 (13:42 UTC)。
958958

959959
<a href="/bugs.html">發現 bug</a>
960960

c-api/bool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h3>導航</h3>
334334
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
335335
<br>
336336
<br>
337-
最後更新於 11月 07, 2025 (10:25 UTC)。
337+
最後更新於 11月 07, 2025 (13:42 UTC)。
338338

339339
<a href="/bugs.html">發現 bug</a>
340340

c-api/buffer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ <h3>導航</h3>
10161016
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
10171017
<br>
10181018
<br>
1019-
最後更新於 11月 07, 2025 (10:25 UTC)。
1019+
最後更新於 11月 07, 2025 (13:42 UTC)。
10201020

10211021
<a href="/bugs.html">發現 bug</a>
10221022

c-api/bytearray.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ <h3>導航</h3>
397397
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
398398
<br>
399399
<br>
400-
最後更新於 11月 07, 2025 (10:25 UTC)。
400+
最後更新於 11月 07, 2025 (13:42 UTC)。
401401

402402
<a href="/bugs.html">發現 bug</a>
403403

0 commit comments

Comments
 (0)