Skip to content

[3.11] gh-87864: Use correct function definition syntax in the docs (GH-103312) #103442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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__`
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Lib/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class that has a metaclass derived from ABCMeta cannot be

class C(metaclass=ABCMeta):
@abstractmethod
def my_abstract_method(self, ...):
def my_abstract_method(self, arg1, arg2, argN):
...
"""
funcobj.__isabstractmethod__ = True
Expand Down
8 changes: 4 additions & 4 deletions Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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\
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\
Expand Down