Skip to content

Commit 590a1b6

Browse files
authored
Merge pull request #79 from braboj/codex/add-header-explaining-argument-unpacking-with--args
Add example header for argument unpacking
2 parents e69a72d + 20b2aad commit 590a1b6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

examples/07_functions/func_unpacking_arguments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Argument unpacking with `*args`
2+
# -----------------------------------------------------------------------------
3+
# When calling a function, the star operator can expand an iterable into
4+
# positional arguments. This allows you to store the arguments in a list or
5+
# other iterable and pass them all at once.
6+
17
def my_function(a, b, c):
28
print(a, b, c)
39

0 commit comments

Comments
 (0)