Skip to content

Commit 8b586f9

Browse files
authored
Merge branch '3.15' into backport-1dd8e71-3.15
2 parents ed2ddc3 + 521ce9a commit 8b586f9

70 files changed

Lines changed: 1160 additions & 716 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.

‎Doc/builtins/stdtypes.rst‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,13 +2129,23 @@ expression support in the :mod:`re` module).
21292129
.. method:: str.capitalize()
21302130

21312131
Return a copy of the string with its first character capitalized and the
2132-
rest lowercased.
2132+
rest lowercased. For example:
2133+
2134+
.. doctest::
2135+
2136+
>>> 'PYTHON IS AMAZING'.capitalize()
2137+
'Python is amazing'
2138+
>>> 'Njemačka starts With a non-ASCII digraph'.capitalize()
2139+
'Njemačka starts with a non-ascii digraph'
2140+
2141+
See also :meth:`title`.
21332142

21342143
.. versionchanged:: 3.8
21352144
The first character is now put into titlecase rather than uppercase.
21362145
This means that characters like digraphs will only have their first
21372146
letter capitalized, instead of the full character.
21382147

2148+
21392149
.. method:: str.casefold()
21402150

21412151
Return a casefolded copy of the string. Casefolded strings may be used for
@@ -3137,7 +3147,7 @@ expression support in the :mod:`re` module).
31373147
>>> titlecase("they're bill's friends.")
31383148
"They're Bill's Friends."
31393149

3140-
See also :meth:`istitle`.
3150+
See also :meth:`istitle` and :meth:`capitalize`.
31413151

31423152

31433153
.. method:: str.translate(table, /)

‎Doc/c-api/frame.rst‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ See also :ref:`Reflection <reflection>`.
9999
100100
Get the *frame*'s :attr:`~frame.f_lasti` attribute.
101101
102-
Returns -1 if ``frame.f_lasti`` is ``None``.
103-
104102
.. versionadded:: 3.11
105103
106104

‎Doc/c-api/gcsupport.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rules:
4242
.. warning::
4343
If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least
4444
a :c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one
45-
from its subclass or subclasses.
45+
from a base class.
4646

4747
When calling :c:func:`PyType_Ready` or some of the APIs that indirectly
4848
call it like :c:func:`PyType_FromSpecWithBases` or

‎Doc/c-api/gen.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Generator Objects
66
-----------------
77

88
Generator objects are what Python uses to implement generator iterators. They
9-
are normally created by iterating over a function that yields values, rather
10-
than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
9+
are normally created by calling a generator function, rather than explicitly
10+
calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
1111

1212

1313
.. c:type:: PyGenObject

‎Doc/c-api/object.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Object Protocol
423423
If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to
424424
determine the subclass status as described in :pep:`3119`. Otherwise,
425425
*derived* is a subclass of *cls* if it is a direct or indirect subclass,
426-
i.e. contained in :attr:`cls.__mro__ <type.__mro__>`.
426+
i.e. if *cls* is contained in :attr:`derived.__mro__ <type.__mro__>`.
427427
428428
Normally only class objects, i.e. instances of :class:`type` or a derived
429429
class, are considered classes. However, objects can override this by having

‎Doc/c-api/typeobj.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
25272527

25282528
Specifically, if *type* uses the default metaclass,
25292529
``type->tp_vectorcall`` must behave the same as
2530-
:c:expr:`PyType_Type->tp_call`, which:
2530+
``Py_TYPE(type)->tp_call``, which:
25312531

25322532
- calls ``type->tp_new``,
25332533

‎Doc/howto/descriptor.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ At this point, the metaclass has loaded member objects for *x* and *y*::
17541754
>>> isinstance(vars(H)['y'], Member)
17551755
True
17561756

1757-
When instances are created, they have a ``slot_values`` list where the
1757+
When instances are created, they have a ``_slotvalues`` list where the
17581758
attributes are stored:
17591759

17601760
.. doctest::

‎Doc/howto/enum.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ Some rules:
913913
:class:`~dataclasses.dataclass`
914914
6. %-style formatting: ``%s`` and ``%r`` call the :class:`Enum` class's
915915
:meth:`~object.__str__` and :meth:`~object.__repr__` respectively; other codes (such as
916-
``%i`` or ``%h`` for IntEnum) treat the enum member as its mixed-in type.
916+
``%i`` or ``%x`` for IntEnum) treat the enum member as its mixed-in type.
917917
7. :ref:`Formatted string literals <f-strings>`, :meth:`str.format`,
918918
and :func:`format` will use the enum's :meth:`~object.__str__` method.
919919

‎Doc/howto/isolating-extensions.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ and the corresponding :c:type:`PyCMethod` signature::
530530
PyTypeObject *defining_class, // defining class
531531
PyObject *const *args, // C array of arguments
532532
Py_ssize_t nargs, // length of "args"
533-
PyObject *kwnames) // NULL, or dict of keyword arguments
533+
PyObject *kwnames) // NULL, or tuple of keyword argument names
534534

535535
Once you have the defining class, call :c:func:`PyType_GetModuleState` to get
536536
the state of its associated module.

‎Doc/howto/perf_profiling.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ or using the environment variable::
273273

274274
``perf inject --jit`` command will read ``perf.data``,
275275
automatically pick up the perf dump file that Python creates (in
276-
``/tmp/perf-$PID.dump``), and then create ``perf.jit.data`` which merges all the
276+
``/tmp/jit-$PID.dump``), and then create ``perf.jit.data`` which merges all the
277277
JIT information together. It should also create a lot of ``jitted-XXXX-N.so``
278278
files in the current directory which are ELF images for all the JIT trampolines
279279
that were created by Python.

0 commit comments

Comments
 (0)