Skip to content

Commit 396afbf

Browse files
Fix docstring of Profiler class (pythonGH-8651)
(cherry picked from commit 2ebd381) Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
1 parent 24a54da commit 396afbf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Lib/cProfile.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ def help():
6464
# ____________________________________________________________
6565

6666
class Profile(_lsprof.Profiler):
67-
"""Profile(custom_timer=None, time_unit=None, subcalls=True, builtins=True)
67+
"""Profile(timer=None, timeunit=None, subcalls=True, builtins=True)
6868
6969
Builds a profiler object using the specified timer function.
7070
The default timer is a fast built-in one based on real time.
71-
For custom timer functions returning integers, time_unit can
71+
For custom timer functions returning integers, timeunit can
7272
be a float specifying a scale (i.e. how long each integer unit
7373
is, in seconds).
7474
"""

‎Modules/_lsprof.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,11 @@ static PyMethodDef profiler_methods[] = {
807807
};
808808

809809
PyDoc_STRVAR(profiler_doc, "\
810-
Profiler(custom_timer=None, time_unit=None, subcalls=True, builtins=True)\n\
810+
Profiler(timer=None, timeunit=None, subcalls=True, builtins=True)\n\
811811
\n\
812812
Builds a profiler object using the specified timer function.\n\
813813
The default timer is a fast built-in one based on real time.\n\
814-
For custom timer functions returning integers, time_unit can\n\
814+
For custom timer functions returning integers, timeunit can\n\
815815
be a float specifying a scale (i.e. how long each integer unit\n\
816816
is, in seconds).\n\
817817
");

0 commit comments

Comments
 (0)