diff options
author | Rommel Martinez <ebzzry@ebzzry.io> | 2018-02-03 17:28:21 +0800 |
---|---|---|
committer | Rommel Martinez <ebzzry@ebzzry.io> | 2018-02-03 17:28:21 +0800 |
commit | 60fcfe86621980a2f98d19fee386c1d0cc4f61db (patch) | |
tree | 236571732390c0f4ccbb962523f54101fa1cfcd1 | |
parent | fce4a810cb066d6d83b829609ac15b08879cd1b0 (diff) |
[python/en]: fix typo
-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 |