]> granicus.if.org Git - python/commitdiff
Fix docstring of Profiler class (GH-8651)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 3 Aug 2018 10:18:45 +0000 (03:18 -0700)
committerGitHub <noreply@github.com>
Fri, 3 Aug 2018 10:18:45 +0000 (03:18 -0700)
(cherry picked from commit 2ebd3813af9172fe1f9b2f6004edf6f1e1e5d9f1)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Lib/cProfile.py
Modules/_lsprof.c

index 1184385ae1f1fe1909f59fc2d79619afcc51e6e4..6ae8512ddd2e4839c4f0b4cbb87a7b7467c804aa 100755 (executable)
@@ -25,11 +25,11 @@ runctx.__doc__ = _pyprofile.runctx.__doc__
 # ____________________________________________________________
 
 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).
     """
index 0e7623ddbc966711e8d03e31cf4e022dc06647d4..5f2eeea6dfcc163c8f1b6a34e2a7d6220cab6466 100644 (file)
@@ -791,11 +791,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\
 ");