File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments