Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee05371

Browse files
committed
Deploying to gh-pages from @7893e44 🚀
1 parentb941cc9 commitee05371

File tree

621 files changed

+2505
-1040
lines changed

Some content is hidden

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

621 files changed

+2505
-1040
lines changed

‎_sources/c-api/cell.rst.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Cell Objects
77

88
"Cell" objects are used to implement variables referenced by multiple scopes.
99
For each such variable, a cell object is created to store the value; the local
10-
variables of each stack frame that references the valuecontains a reference to
10+
variables of each stack frame that references the valuecontain a reference to
1111
the cells from outer scopes which also use that variable. When the value is
1212
accessed, the value contained in the cell is used instead of the cell object
1313
itself. This de-referencing of the cell object requires support from the

‎_sources/c-api/codec.rst.txt‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,13 @@ Registry API for Unicode encoding error handlers
129129
Replace the unicode encode error with ``\N{...}`` escapes.
130130
131131
..versionadded::3.5
132+
133+
134+
Codec utility variables
135+
-----------------------
136+
137+
..c:var::constchar *Py_hexdigits
138+
139+
A string constant containing the lowercase hexadecimal digits: ``"0123456789abcdef"``.
140+
141+
..versionadded::3.3

‎_sources/c-api/datetime.rst.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ macros.
4646

4747
..c:var:: PyTypeObject PyDateTime_DeltaType
4848
49-
This instance of:c:type:`PyTypeObject` represents Python type for
49+
This instance of:c:type:`PyTypeObject` representsthePython type for
5050
the difference between two datetime values;
5151
it is the same object as:class:`datetime.timedelta` in the Python layer.
5252

‎_sources/c-api/descriptor.rst.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ found in the dictionary of type objects.
3232
3333
..c:function::intPyDescr_IsData(PyObject *descr)
3434
35-
Return non-zero if the descriptorobjects *descr* describes a data attribute, or
35+
Return non-zero if the descriptorobject *descr* describes a data attribute, or
3636
``0`` if it describes a method. *descr* must be a descriptor object; there is
3737
no error checking.
3838

‎_sources/c-api/dict.rst.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ Dictionary Objects
245245
``len(p)`` on a dictionary.
246246
247247
248+
..c:function:: Py_ssize_tPyDict_GET_SIZE(PyObject *p)
249+
250+
Similar to:c:func:`PyDict_Size`, but without error checking.
251+
252+
248253
..c:function::intPyDict_Next(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue)
249254
250255
Iterate over all key-value pairs in the dictionary *p*. The

‎_sources/c-api/exceptions.rst.txt‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,27 @@ these are the C equivalent to :func:`reprlib.recursive_repr`.
979979
Ends a:c:func:`Py_ReprEnter`. Must be called once for each
980980
invocation of:c:func:`Py_ReprEnter` that returns zero.
981981
982+
..c:function::intPy_GetRecursionLimit(void)
983+
984+
Get the recursion limit for the current interpreter. It can be set with
985+
:c:func:`Py_SetRecursionLimit`. The recursion limit prevents the
986+
Python interpreter stack from growing infinitely.
987+
988+
This function cannot fail, and the caller must hold an
989+
:term:`attached thread state`.
990+
991+
.. seealso::
992+
:py:func:`sys.getrecursionlimit`
993+
994+
.. c:function:: void Py_SetRecursionLimit(int new_limit)
995+
996+
Set the recursion limit for the current interpreter.
997+
998+
This function cannot fail, and the caller must hold an
999+
:term:`attached thread state`.
1000+
1001+
.. seealso::
1002+
:py:func:`sys.setrecursionlimit`
9821003
9831004
.. _standardexceptions:
9841005

‎_sources/c-api/float.rst.txt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ Floating-Point Objects
7878
Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`.
7979
8080
81+
.. c:macro:: Py_RETURN_NAN
82+
83+
Return :data:`math.nan` from a function.
84+
85+
On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``.
86+
87+
88+
.. c:macro:: Py_RETURN_INF(sign)
89+
90+
Return :data:`math.inf` or :data:`-math.inf <math.inf>` from a function,
91+
depending on the sign of *sign*.
92+
93+
On most platforms, this is equivalent to the following::
94+
95+
return PyFloat_FromDouble(copysign(INFINITY, sign));
96+
97+
8198
Pack and Unpack functions
8299
-------------------------
83100

‎_sources/c-api/init_config.rst.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Error Handling
102102
* Set *\*err_msg* and return ``1`` if an error is set.
103103
* Set *\*err_msg* to ``NULL`` and return ``0`` otherwise.
104104
105-
An error message isan UTF-8 encoded string.
105+
An error message isa UTF-8 encoded string.
106106
107107
If *config* has an exit code, format the exit code as an error
108108
message.

‎_sources/c-api/iterator.rst.txt‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,71 @@ sentinel value is returned.
5050
callable object that can be called with no parameters; each call to it should
5151
return the next item in the iteration. When *callable* returns a value equal to
5252
*sentinel*, the iteration will be terminated.
53+
54+
55+
Range Objects
56+
^^^^^^^^^^^^^
57+
58+
..c:var:: PyTypeObject PyRange_Type
59+
60+
The type object for:class:`range` objects.
61+
62+
63+
..c:function::intPyRange_Check(PyObject *o)
64+
65+
Return true if the object *o* is an instance of a:class:`range` object.
66+
This function always succeeds.
67+
68+
69+
Builtin Iterator Types
70+
^^^^^^^^^^^^^^^^^^^^^^
71+
72+
These are built-in iteration types that are included in Python's C API, but
73+
provide no additional functions. They are here for completeness.
74+
75+
76+
..list-table::
77+
:widths: auto
78+
:header-rows: 1
79+
80+
* * C type
81+
* Python type
82+
* * .. c:var:: PyTypeObject PyEnum_Type
83+
*:py:class:`enumerate`
84+
* * .. c:var:: PyTypeObject PyFilter_Type
85+
*:py:class:`filter`
86+
* * .. c:var:: PyTypeObject PyMap_Type
87+
*:py:class:`map`
88+
* * .. c:var:: PyTypeObject PyReversed_Type
89+
*:py:class:`reversed`
90+
* * .. c:var:: PyTypeObject PyZip_Type
91+
*:py:class:`zip`
92+
93+
94+
Other Iterator Objects
95+
^^^^^^^^^^^^^^^^^^^^^^
96+
97+
..c:var:: PyTypeObject PyByteArrayIter_Type
98+
..c:var:: PyTypeObject PyBytesIter_Type
99+
..c:var:: PyTypeObject PyListIter_Type
100+
..c:var:: PyTypeObject PyListRevIter_Type
101+
..c:var:: PyTypeObject PySetIter_Type
102+
..c:var:: PyTypeObject PyTupleIter_Type
103+
..c:var:: PyTypeObject PyRangeIter_Type
104+
..c:var:: PyTypeObject PyLongRangeIter_Type
105+
..c:var:: PyTypeObject PyDictIterKey_Type
106+
..c:var:: PyTypeObject PyDictRevIterKey_Type
107+
..c:var:: PyTypeObject PyDictIterValue_Type
108+
..c:var:: PyTypeObject PyDictRevIterValue_Type
109+
..c:var:: PyTypeObject PyDictIterItem_Type
110+
..c:var:: PyTypeObject PyDictRevIterItem_Type
111+
112+
Type objects for iterators of various built-in objects.
113+
114+
Do not create instances of these directly; prefer calling
115+
:c:func:`PyObject_GetIter` instead.
116+
117+
Note that there is no guarantee that a given built-in type uses a given iterator
118+
type. For example, iterating over:class:`range` will use one of two iterator
119+
types depending on the size of the range. Other types may start using a
120+
similar scheme in the future, without warning.

‎_sources/c-api/long.rst.txt‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
161161
.. versionadded:: 3.13
162162
163163
164+
.. c:macro:: PyLong_FromPid(pid)
165+
166+
Macro for creating a Python integer from a process identifier.
167+
168+
This can be defined as an alias to :c:func:`PyLong_FromLong` or
169+
:c:func:`PyLong_FromLongLong`, depending on the size of the system's
170+
PID type.
171+
172+
.. versionadded:: 3.2
173+
174+
164175
.. c:function:: long PyLong_AsLong(PyObject *obj)
165176
166177
..index::
@@ -575,6 +586,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
575586
.. versionadded:: 3.13
576587
577588
589+
.. c:macro:: PyLong_AsPid(pid)
590+
591+
Macro for converting a Python integer into a process identifier.
592+
593+
This can be defined as an alias to :c:func:`PyLong_AsLong`,
594+
:c:func:`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the
595+
size of the system's PID type.
596+
597+
.. versionadded:: 3.2
598+
599+
578600
.. c:function:: int PyLong_GetSign(PyObject *obj, int *sign)
579601
580602
Get the sign of the integer object *obj*.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp