Skip to content

Commit a200a57

Browse files
authored
Update the output of a code snippet in docs (#5511)
1 parent c01d17f commit a200a57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

guide/src/function/signature.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,13 @@ import mymodule
9494
mc = mymodule.MyClass()
9595
print(mc.method(44, False, "World", 666, x=44, y=55))
9696
print(mc.method(num=-1, name="World"))
97-
print(mc.make_change(44, False))
97+
print(mc.make_change(44))
9898
```
9999
Produces output:
100100
```text
101-
py_args=('World', 666), py_kwargs=Some({'x': 44, 'y': 55}), name=Hello, num=44
102-
py_args=(), py_kwargs=None, name=World, num=-1
101+
num=44 (was previously=-1), py_args=(False, 'World', 666), name=Hello, py_kwargs=Some({'x': 44, 'y': 55})
102+
num=-1 (was previously=44), py_args=(), name=World, py_kwargs=None
103103
num=44
104-
num=-1
105104
```
106105

107106
> Note: to use keywords like `struct` as a function argument, use "raw identifier" syntax `r#struct` in both the signature and the function definition:

0 commit comments

Comments
 (0)