Skip to content

Commit e715da6

Browse files
gh-87864: Use correct function definition syntax in the docs (GH-103312)
(cherry picked from commit 50b4b15) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 07a2851 commit e715da6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Glossary
214214
A callable is an object that can be called, possibly with a set
215215
of arguments (see :term:`argument`), with the following syntax::
216216

217-
callable(argument1, argument2, ...)
217+
callable(argument1, argument2, argumentN)
218218

219219
A :term:`function`, and by extension a :term:`method`, is a callable.
220220
An instance of a class that implements the :meth:`~object.__call__`

Doc/library/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ are always available. They are listed here in alphabetical order.
16771677

16781678
class C:
16791679
@staticmethod
1680-
def f(arg1, arg2, ...): ...
1680+
def f(arg1, arg2, argN): ...
16811681

16821682
The ``@staticmethod`` form is a function :term:`decorator` -- see
16831683
:ref:`function` for details.

Lib/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class that has a metaclass derived from ABCMeta cannot be
1818
1919
class C(metaclass=ABCMeta):
2020
@abstractmethod
21-
def my_abstract_method(self, ...):
21+
def my_abstract_method(self, arg1, arg2, argN):
2222
...
2323
"""
2424
funcobj.__isabstractmethod__ = True

Objects/funcobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ functools_wraps(PyObject *wrapper, PyObject *wrapped)
845845
846846
class C:
847847
@classmethod
848-
def f(cls, arg1, arg2, ...):
848+
def f(cls, arg1, arg2, argN):
849849
...
850850
851851
It can be called either on the class (e.g. C.f()) or on an instance
@@ -970,7 +970,7 @@ To declare a class method, use this idiom:\n\
970970
\n\
971971
class C:\n\
972972
@classmethod\n\
973-
def f(cls, arg1, arg2, ...):\n\
973+
def f(cls, arg1, arg2, argN):\n\
974974
...\n\
975975
\n\
976976
It can be called either on the class (e.g. C.f()) or on an instance\n\
@@ -1043,7 +1043,7 @@ PyClassMethod_New(PyObject *callable)
10431043
10441044
class C:
10451045
@staticmethod
1046-
def f(arg1, arg2, ...):
1046+
def f(arg1, arg2, argN):
10471047
...
10481048
10491049
It can be called either on the class (e.g. C.f()) or on an instance
@@ -1167,7 +1167,7 @@ To declare a static method, use this idiom:\n\
11671167
\n\
11681168
class C:\n\
11691169
@staticmethod\n\
1170-
def f(arg1, arg2, ...):\n\
1170+
def f(arg1, arg2, argN):\n\
11711171
...\n\
11721172
\n\
11731173
It can be called either on the class (e.g. C.f()) or on an instance\n\

0 commit comments

Comments
 (0)