Skip to content

Commit 49ca018

Browse files
clarify valid key types in print_stats method
Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 7fdbfab commit 49ca018

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Doc/library/profile.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,7 @@ functions:
301301

302302
The *sort* parameter specifies the sorting order of the displayed
303303
statistics. It accepts a single key or a tuple of keys to enable
304-
multi-level sorting. When passing a tuple of keys, each key must be
305-
either a string or a SortKey enum, excluding integers. However,
306-
if only a single key is provided, it can be an integer, a string, or a
307-
SortKey enum. These keys serve to identify the basis of the sort,
308-
such as ``'time'``, ``'name'``, ``SortKey.TIME``, or ``SortKey.NAME``,
309-
among others."
304+
multi-level sorting, as in :func:`Stats.sort_stats <pstats.Stats.sort_stats>.
310305
311306
.. versionadded:: 3.13
312307
:meth:`~Profile.print_stats` now accepts a single key or a tuple of keys.

0 commit comments

Comments
 (0)