diff options
author | Pratik Karki <predatoramigo@gmail.com> | 2018-02-28 18:55:11 +0545 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-28 18:55:11 +0545 |
commit | 99409ef182523631bd517a3e9c431b7b33be3604 (patch) | |
tree | 400366551a43036d56fea10b3f6584cadbcb814f /python.html.markdown | |
parent | 1e88ceb05ae15a2703511b489aa54298cbb85cc5 (diff) | |
parent | 60fcfe86621980a2f98d19fee386c1d0cc4f61db (diff) |
Merge pull request #3056 from ebzzry/master
[python/en]: fix typo
Diffstat (limited to 'python.html.markdown')
-rw-r--r-- | python.html.markdown | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python.html.markdown b/python.html.markdown index 89fa7046..df1ca6f2 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -7,6 +7,7 @@ contributors: - ["evuez", "http://github.com/evuez"] - ["asyne", "https://github.com/justblah"] - ["habi", "http://github.com/habi"] + - ["Rommel Martinez", "https://ebzzry.io"] filename: learnpython.py --- @@ -508,9 +509,9 @@ all_the_args(1, 2, a=3, b=4) prints: # Use * to expand positional args and use ** to expand keyword args. args = (1, 2, 3, 4) kwargs = {"a": 3, "b": 4} -all_the_args(*args) # equivalent to foo(1, 2, 3, 4) -all_the_args(**kwargs) # equivalent to foo(a=3, b=4) -all_the_args(*args, **kwargs) # equivalent to foo(1, 2, 3, 4, a=3, b=4) +all_the_args(*args) # equivalent to all_the_args(1, 2, 3, 4) +all_the_args(**kwargs) # equivalent to all_the_args(a=3, b=4) +all_the_args(*args, **kwargs) # equivalent to all_the_args(1, 2, 3, 4, a=3, b=4) # you can pass args and kwargs along to other functions that take args/kwargs |