Skip to content

Commit af2fb6b

Browse files
committed
Merge pull request yasoob#58 from mathur/master
Spacing fixes for first chapter
2 parents 1b83ba1 + 8a848e2 commit af2fb6b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

args_and_kwargs.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ arguments** in a function. Here is an example to get you going with it:
5252
def greet_me(**kwargs):
5353
if kwargs is not None:
5454
for key, value in kwargs.iteritems():
55-
print "%s == %s" %(key,value)
55+
print "%s == %s" %(key, value)
5656
5757
>>> greet_me(name="yasoob")
5858
name == yasoob
@@ -81,14 +81,14 @@ function. Here's how to do it:
8181
.. code:: python
8282
8383
# first with *args
84-
>>> args = ("two", 3,5)
84+
>>> args = ("two", 3, 5)
8585
>>> test_args_kwargs(*args)
8686
arg1: two
8787
arg2: 3
8888
arg3: 5
8989
9090
# now with **kwargs:
91-
>>> kwargs = {"arg3": 3, "arg2": "two","arg1":5}
91+
>>> kwargs = {"arg3": 3, "arg2": "two", "arg1": 5}
9292
>>> test_args_kwargs(**kwargs)
9393
arg1: 5
9494
arg2: two
@@ -100,7 +100,7 @@ So if you want to use all three of these in functions then the order is
100100

101101
.. code:: python
102102
103-
some_func(fargs,*args,**kwargs)
103+
some_func(fargs, *args, **kwargs)
104104
105105
When to use them?
106106
^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)