Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c1e68c commit 5a58c52Copy full SHA for 5a58c52
1 file changed
Doc/whatsnew/3.8.rst
@@ -142,12 +142,11 @@ However, these are invalid calls::
142
143
One use case for this notation is that it allows pure Python functions
144
to fully emulate behaviors of existing C coded functions. For example,
145
-the built-in :func:`pow` function does not accept keyword arguments::
+the built-in :func:`divmod` function does not accept keyword arguments::
146
147
- def pow(x, y, z=None, /):
148
- "Emulate the built in pow() function"
149
- r = x ** y
150
- return r if z is None else r%z
+ def divmod(a, b, /):
+ "Emulate the built in divmod() function"
+ return (a // b, a % b)
151
152
Another use case is to preclude keyword arguments when the parameter
153
name is not helpful. For example, the builtin :func:`len` function has
0 commit comments