@@ -450,9 +450,9 @@ Arguments
450
450
451
451
### Inside Function Definition
452
452
``` python
453
- def f (<nondefault_args>) # def f(x, y)
454
- def f (<default_args>) # def f(x=0, y=0)
455
- def f (<nondefault_args>, <default_args>) # def f(x, y=0)
453
+ def f (<nondefault_args>): # def f(x, y)
454
+ def f (<default_args>): # def f(x=0, y=0)
455
+ def f (<nondefault_args>, <default_args>): # def f(x, y=0)
456
456
```
457
457
458
458
@@ -485,22 +485,22 @@ def add(*a):
485
485
486
486
#### Legal argument combinations with calls:
487
487
``` python
488
- def f (* args ): # f(1, 2, 3)
489
- def f (x , * args ): # f(1, 2, 3)
490
- def f (* args , z ) # f(1, 2, z=3)
491
- def f (x , * args , z ) # f(1, 2, z=3)
488
+ def f (* args ): # f(1, 2, 3)
489
+ def f (x , * args ): # f(1, 2, 3)
490
+ def f (* args , z ): # f(1, 2, z=3)
491
+ def f (x , * args , z ): # f(1, 2, z=3)
492
492
```
493
493
494
494
``` python
495
- def f (** kwargs ) # f(x=1, y=2, z=3)
496
- def f (x , ** kwargs ) # f(x=1, y=2, z=3) | f(1, y=2, z=3)
495
+ def f (** kwargs ): # f(x=1, y=2, z=3)
496
+ def f (x , ** kwargs ): # f(x=1, y=2, z=3) | f(1, y=2, z=3)
497
497
```
498
498
499
499
``` python
500
- def f (* args , ** kwargs ) # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3) | f(1, 2, 3)
501
- def f (x , * args , ** kwargs ) # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3) | f(1, 2, 3)
502
- def f (* args , y , ** kwargs ) # f(x=1, y=2, z=3) | f(1, y=2, z=3)
503
- def f (x , * args , z , ** kwargs ) # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3)
500
+ def f (* args , ** kwargs ): # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3) | f(1, 2, 3)
501
+ def f (x , * args , ** kwargs ): # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3) | f(1, 2, 3)
502
+ def f (* args , y , ** kwargs ): # f(x=1, y=2, z=3) | f(1, y=2, z=3)
503
+ def f (x , * args , z , ** kwargs ): # f(x=1, y=2, z=3) | f(1, y=2, z=3) | f(1, 2, z=3)
504
504
```
505
505
506
506
### Other Uses
0 commit comments