[Python-checkins] Fix docstring of Profiler class (GH-8651)

INADA Naoki webhook-mailer at python.org
Fri Aug 3 05:10:10 EDT 2018


https://github.com/python/cpython/commit/2ebd3813af9172fe1f9b2f6004edf6f1e1e5d9f1
commit: 2ebd3813af9172fe1f9b2f6004edf6f1e1e5d9f1
branch: master
author: INADA Naoki <methane at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-08-03T18:09:57+09:00
summary:

Fix docstring of Profiler class (GH-8651)

files:
M Lib/cProfile.py
M Modules/_lsprof.c

diff --git a/Lib/cProfile.py b/Lib/cProfile.py
index c8045043cbcf..3c9be3cbd224 100755
--- a/Lib/cProfile.py
+++ b/Lib/cProfile.py
@@ -25,11 +25,11 @@ def runctx(statement, globals, locals, filename=None, sort=-1):
 # ____________________________________________________________
 
 class Profile(_lsprof.Profiler):
-    """Profile(custom_timer=None, time_unit=None, subcalls=True, builtins=True)
+    """Profile(timer=None, timeunit=None, subcalls=True, builtins=True)
 
     Builds a profiler object using the specified timer function.
     The default timer is a fast built-in one based on real time.
-    For custom timer functions returning integers, time_unit can
+    For custom timer functions returning integers, timeunit can
     be a float specifying a scale (i.e. how long each integer unit
     is, in seconds).
     """
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c
index 602747098bb6..233f62fe2f14 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -788,11 +788,11 @@ static PyMethodDef profiler_methods[] = {
 };
 
 PyDoc_STRVAR(profiler_doc, "\
-Profiler(custom_timer=None, time_unit=None, subcalls=True, builtins=True)\n\
+Profiler(timer=None, timeunit=None, subcalls=True, builtins=True)\n\
 \n\
     Builds a profiler object using the specified timer function.\n\
     The default timer is a fast built-in one based on real time.\n\
-    For custom timer functions returning integers, time_unit can\n\
+    For custom timer functions returning integers, timeunit can\n\
     be a float specifying a scale (i.e. how long each integer unit\n\
     is, in seconds).\n\
 ");



More information about the Python-checkins mailing list