Skip to content

Commit 6386f62

Browse files
committed
Splat
1 parent 2c84fed commit 6386f62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ def f(<nondefault_args>, <default_args>) # def f(x, y=0)
454454
Splat Operator
455455
--------------
456456
### Inside Function Call
457+
**Splat expands collection into positional arguments, while splatty-splat expands dictionary into keyword arguments.**
457458
```python
458459
args = (1, 2)
459460
kwargs = {'x': 3, 'y': 4, 'z': 5}
@@ -466,7 +467,7 @@ func(1, 2, x=3, y=4, z=5)
466467
```
467468

468469
### Inside Function Definition
469-
**It combines zero or more positional arguments into tuple.**
470+
**Splat combines zero or more positional arguments into tuple, while splatty-splat combines zero or more keyword arguments into dictionary.**
470471
```python
471472
def add(*a):
472473
return sum(a)

0 commit comments

Comments
 (0)