Skip to content

Commit b82da3b

Browse files
Deploy preview for PR 1231 🛫
1 parent 7d18d2d commit b82da3b

586 files changed

Lines changed: 675 additions & 631 deletions

File tree

Some content is hidden

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

pr-preview/pr-1231/_sources/c-api/typeobj.rst.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,13 +3045,13 @@ Buffer Object Structures
30453045
steps:
30463046

30473047
(1) Check if the request can be met. If not, raise :exc:`BufferError`,
3048-
set :c:expr:`view->obj` to ``NULL`` and return ``-1``.
3048+
set ``view->obj`` to ``NULL`` and return ``-1``.
30493049

30503050
(2) Fill in the requested fields.
30513051

30523052
(3) Increment an internal counter for the number of exports.
30533053

3054-
(4) Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`.
3054+
(4) Set ``view->obj`` to *exporter* and increment ``view->obj``.
30553055

30563056
(5) Return ``0``.
30573057

@@ -3077,10 +3077,10 @@ Buffer Object Structures
30773077
schemes can be used:
30783078

30793079
* Re-export: Each member of the tree acts as the exporting object and
3080-
sets :c:expr:`view->obj` to a new reference to itself.
3080+
sets ``view->obj`` to a new reference to itself.
30813081

30823082
* Redirect: The buffer request is redirected to the root object of the
3083-
tree. Here, :c:expr:`view->obj` will be a new reference to the root
3083+
tree. Here, ``view->obj`` will be a new reference to the root
30843084
object.
30853085

30863086
The individual fields of *view* are described in section
@@ -3134,7 +3134,7 @@ Buffer Object Structures
31343134
*view* argument.
31353135

31363136

3137-
This function MUST NOT decrement :c:expr:`view->obj`, since that is
3137+
This function MUST NOT decrement ``view->obj``, since that is
31383138
done automatically in :c:func:`PyBuffer_Release` (this scheme is
31393139
useful for breaking reference cycles).
31403140

pr-preview/pr-1231/_sources/library/bisect.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ example uses :py:func:`~bisect.bisect` to look up a letter grade for an exam sco
203203
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
204204
a 'B', and so on::
205205

206-
>>> def grade(score)
206+
>>> def grade(score):
207207
... i = bisect([60, 70, 80, 90], score)
208208
... return "FDCBA"[i]
209209
...

pr-preview/pr-1231/_sources/library/collections.abc.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
459459
The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash value
460460
for the set; however, :meth:`~object.__hash__` is not defined because not all sets
461461
are :term:`hashable` or immutable. To add set hashability using mixins,
462-
inherit from both :meth:`Set` and :meth:`Hashable`, then define
462+
inherit from both :class:`Set` and :class:`Hashable`, then define
463463
``__hash__ = Set._hash``.
464464

465465
.. seealso::

pr-preview/pr-1231/_sources/library/operator.rst.txt

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The mathematical and bitwise operations are the most numerous:
112112
.. function:: and_(a, b)
113113
__and__(a, b)
114114

115-
Return the bitwise and of *a* and *b*.
115+
Return ``a & b``.
116116

117117

118118
.. function:: floordiv(a, b)
@@ -136,13 +136,13 @@ The mathematical and bitwise operations are the most numerous:
136136
__inv__(obj)
137137
__invert__(obj)
138138

139-
Return the bitwise inverse of the number *obj*. This is equivalent to ``~obj``.
139+
Return ``~obj``.
140140

141141

142142
.. function:: lshift(a, b)
143143
__lshift__(a, b)
144144

145-
Return *a* shifted left by *b*.
145+
Return ``a << b``.
146146

147147

148148
.. function:: mod(a, b)
@@ -154,7 +154,7 @@ The mathematical and bitwise operations are the most numerous:
154154
.. function:: mul(a, b)
155155
__mul__(a, b)
156156

157-
Return ``a * b``, for *a* and *b* numbers.
157+
Return ``a * b``.
158158

159159

160160
.. function:: matmul(a, b)
@@ -174,25 +174,25 @@ The mathematical and bitwise operations are the most numerous:
174174
.. function:: or_(a, b)
175175
__or__(a, b)
176176

177-
Return the bitwise or of *a* and *b*.
177+
Return ``a | b``.
178178

179179

180180
.. function:: pos(obj)
181181
__pos__(obj)
182182

183-
Return *obj* positive (``+obj``).
183+
Return ``+obj``.
184184

185185

186186
.. function:: pow(a, b)
187187
__pow__(a, b)
188188

189-
Return ``a ** b``, for *a* and *b* numbers.
189+
Return ``a ** b``.
190190

191191

192192
.. function:: rshift(a, b)
193193
__rshift__(a, b)
194194

195-
Return *a* shifted right by *b*.
195+
Return ``a >> b``.
196196

197197

198198
.. function:: sub(a, b)
@@ -211,7 +211,7 @@ The mathematical and bitwise operations are the most numerous:
211211
.. function:: xor(a, b)
212212
__xor__(a, b)
213213

214-
Return the bitwise exclusive or of *a* and *b*.
214+
Return ``a ^ b``.
215215

216216

217217
Operations which work with sequences (some of them with mappings too) include:
@@ -405,13 +405,18 @@ Python syntax and the functions in the :mod:`!operator` module.
405405
+-----------------------+-------------------------+---------------------------------------+
406406
| Division | ``a // b`` | ``floordiv(a, b)`` |
407407
+-----------------------+-------------------------+---------------------------------------+
408-
| Bitwise And | ``a & b`` | ``and_(a, b)`` |
408+
| Bitwise And, or | ``a & b`` | ``and_(a, b)`` |
409+
| Intersection | | |
409410
+-----------------------+-------------------------+---------------------------------------+
410-
| Bitwise Exclusive Or | ``a ^ b`` | ``xor(a, b)`` |
411+
| Bitwise Exclusive Or, | ``a ^ b`` | ``xor(a, b)`` |
412+
| or Symmetric | | |
413+
| Difference | | |
411414
+-----------------------+-------------------------+---------------------------------------+
412-
| Bitwise Inversion | ``~ a`` | ``invert(a)`` |
415+
| Bitwise Inversion, or | ``~ a`` | ``invert(a)`` |
416+
| Complement | | |
413417
+-----------------------+-------------------------+---------------------------------------+
414-
| Bitwise Or | ``a | b`` | ``or_(a, b)`` |
418+
| Bitwise Or, or | ``a | b`` | ``or_(a, b)`` |
419+
| Union | | |
415420
+-----------------------+-------------------------+---------------------------------------+
416421
| Exponentiation | ``a ** b`` | ``pow(a, b)`` |
417422
+-----------------------+-------------------------+---------------------------------------+

pr-preview/pr-1231/_sources/library/stdtypes.rst.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,9 +2174,25 @@ expression support in the :mod:`re` module).
21742174
character, ``False`` otherwise. Digits include decimal characters and digits that need
21752175
special handling, such as the compatibility superscript digits.
21762176
This covers digits which cannot be used to form numbers in base 10,
2177-
like the Kharosthi numbers. Formally, a digit is a character that has the
2177+
like the `Kharosthi numbers <https://en.wikipedia.org/wiki/Kharosthi#Numerals>`__.
2178+
Formally, a digit is a character that has the
21782179
property value Numeric_Type=Digit or Numeric_Type=Decimal.
21792180

2181+
For example:
2182+
2183+
.. doctest::
2184+
2185+
>>> '0123456789'.isdigit()
2186+
True
2187+
>>> '٠١٢٣٤٥٦٧٨٩'.isdigit() # Arabic-Indic digits zero to nine
2188+
True
2189+
>>> ''.isdigit() # Vulgar fraction one fifth
2190+
False
2191+
>>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()
2192+
(False, True, True)
2193+
2194+
See also :meth:`isdecimal` and :meth:`isnumeric`.
2195+
21802196

21812197
.. method:: str.isidentifier()
21822198

@@ -2217,15 +2233,14 @@ expression support in the :mod:`re` module).
22172233

22182234
>>> '0123456789'.isnumeric()
22192235
True
2220-
>>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() # Arabic-indic digit zero to nine
2236+
>>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() # Arabic-Indic digits zero to nine
22212237
True
22222238
>>> ''.isnumeric() # Vulgar fraction one fifth
22232239
True
22242240
>>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()
22252241
(False, True, True)
22262242

2227-
See also :meth:`isdecimal` and :meth:`isdigit`. Numeric characters are
2228-
a superset of decimal numbers.
2243+
See also :meth:`isdecimal` and :meth:`isdigit`.
22292244

22302245

22312246
.. method:: str.isprintable()

pr-preview/pr-1231/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 6月 08, 2026 (00:49 UTC)。
359+
最後更新於 6月 09, 2026 (00:43 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1231/bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
250250
</section>
251251
<section id="getting-started-contributing-to-python-yourself">
252252
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
253-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
253+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
254254
</section>
255255
</section>
256256

@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 6月 08, 2026 (00:49 UTC)。
396+
最後更新於 6月 09, 2026 (00:43 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1231/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 6月 08, 2026 (00:49 UTC)。
368+
最後更新於 6月 09, 2026 (00:43 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1231/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ <h3>導航</h3>
577577
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
578578
<br>
579579
<br>
580-
最後更新於 6月 08, 2026 (00:49 UTC)。
580+
最後更新於 6月 09, 2026 (00:43 UTC)。
581581

582582
<a href="/bugs.html">發現 bug</a>
583583

pr-preview/pr-1231/c-api/apiabiversion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 6月 08, 2026 (00:49 UTC)。
517+
最後更新於 6月 09, 2026 (00:43 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

0 commit comments

Comments
 (0)