]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87864: Use correct function definition syntax in the docs (GH-103312)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 11 Apr 2023 14:19:33 +0000 (07:19 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Apr 2023 14:19:33 +0000 (07:19 -0700)
(cherry picked from commit 50b4b1598411ed393f47ce7f4fffbe5b9063cd42)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/glossary.rst
Doc/library/functions.rst
Lib/abc.py
Objects/funcobject.c

index 3d74d550dc345a57eb63d8be16ad26de1c930367..53e8cdcae1cd66a251c3e55281138beaeb0d1f56 100644 (file)
@@ -214,7 +214,7 @@ Glossary
       A callable is an object that can be called, possibly with a set
       of arguments (see :term:`argument`), with the following syntax::
 
-         callable(argument1, argument2, ...)
+         callable(argument1, argument2, argumentN)
 
       A :term:`function`, and by extension a :term:`method`, is a callable.
       An instance of a class that implements the :meth:`~object.__call__`
index 2ce3860440be7763f2a622e4e3cffbe9ebf0a446..1c3deb2e78c76233da035d8e90ff83be69e63c3c 100644 (file)
@@ -1677,7 +1677,7 @@ are always available.  They are listed here in alphabetical order.
 
       class C:
           @staticmethod
-          def f(arg1, arg2, ...): ...
+          def f(arg1, arg2, argN): ...
 
    The ``@staticmethod`` form is a function :term:`decorator` -- see
    :ref:`function` for details.
index 42048ddb855381f7ec7f10be2aa1b7d437107989..f8a4e11ce9c3b1e7a8afeae5626a73af81a7a208 100644 (file)
@@ -18,7 +18,7 @@ def abstractmethod(funcobj):
 
         class C(metaclass=ABCMeta):
             @abstractmethod
-            def my_abstract_method(self, ...):
+            def my_abstract_method(self, arg1, arg2, argN):
                 ...
     """
     funcobj.__isabstractmethod__ = True
index 57600c97e6aa31b252e5243ea5d19705baafbb2d..3a0553261bf13273c5808488eeadc3eba8cfe317 100644 (file)
@@ -845,7 +845,7 @@ functools_wraps(PyObject *wrapper, PyObject *wrapped)
 
      class C:
          @classmethod
-         def f(cls, arg1, arg2, ...):
+         def f(cls, arg1, arg2, argN):
              ...
 
    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\
 \n\
   class C:\n\
       @classmethod\n\
-      def f(cls, arg1, arg2, ...):\n\
+      def f(cls, arg1, arg2, argN):\n\
           ...\n\
 \n\
 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)
 
      class C:
          @staticmethod
-         def f(arg1, arg2, ...):
+         def f(arg1, arg2, argN):
              ...
 
    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\
 \n\
      class C:\n\
          @staticmethod\n\
-         def f(arg1, arg2, ...):\n\
+         def f(arg1, arg2, argN):\n\
              ...\n\
 \n\
 It can be called either on the class (e.g. C.f()) or on an instance\n\