mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-87864: Use correct function definition syntax in the docs (#103312)
This commit is contained in:
parent
55c99d97e1
commit
50b4b15984
4 changed files with 7 additions and 7 deletions
|
@ -942,7 +942,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
|
||||
|
@ -1066,7 +1066,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\
|
||||
|
@ -1138,7 +1138,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
|
||||
|
@ -1260,7 +1260,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\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue