bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst
index 5d0ea7d..fa02bde 100644
--- a/Doc/library/operator.rst
+++ b/Doc/library/operator.rst
@@ -339,7 +339,7 @@
[('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)]
-.. function:: methodcaller(name[, args...])
+.. function:: methodcaller(name, /, *args, **kwargs)
Return a callable object that calls the method *name* on its operand. If
additional arguments and/or keyword arguments are given, they will be given
@@ -352,7 +352,7 @@
Equivalent to::
- def methodcaller(name, *args, **kwargs):
+ def methodcaller(name, /, *args, **kwargs):
def caller(obj):
return getattr(obj, name)(*args, **kwargs)
return caller