@@ -13,8 +13,8 @@ Usage of \*args
1313
1414\* args and \*\* kwargs are mostly used in function definitions. \* args
1515and \*\* kwargs allow you to pass a variable number of arguments to a
16- function. What does variable mean here is that you do not know before
17- hand that how many arguments can be passed to your function by the user
16+ function. What variable means here is that you do not know beforehand
17+ how many arguments can be passed to your function by the user
1818so in this case you use these two keywords. \* args is used to send a
1919**non-keyworded ** variable length argument list to the function. Here's
2020an example to help you get a clear idea:
@@ -37,7 +37,7 @@ This produces the following result:
3737 another arg through * argv : eggs
3838 another arg through * argv : test
3939
40- I hope this cleared away any confusion that you had. So now lets talk
40+ I hope this cleared away any confusion that you had. So now let's talk
4141about \*\* kwargs
4242
4343Usage of \*\* kwargs
@@ -57,9 +57,9 @@ arguments** in a function. Here is an example to get you going with it:
5757 >> > greet_me(name = " yasoob" )
5858 name == yasoob
5959
60- So can you see how we handled a keyworded argument list in our function.
60+ So you can see how we handled a keyworded argument list in our function.
6161This is just the basics of \*\* kwargs and you can see how useful it is.
62- Now lets talk about how you can use \* args and \*\* kwargs to call a
62+ Now let's talk about how you can use \* args and \*\* kwargs to call a
6363function with a list or dictionary of arguments.
6464
6565Using \* args and \*\* kwargs to call a function
@@ -105,9 +105,9 @@ So if you want to use all three of these in functions then the order is
105105 When to use them?
106106^^^^^^^^^^^^^^^^^
107107
108- It really depends on what are your requirements. The most common use
108+ It really depends on what your requirements are . The most common use
109109case is when making function decorators (discussed in another chapter).
110- More over it can be used in monkey patching as well. Monkey patching
110+ Moreover it can be used in monkey patching as well. Monkey patching
111111means modifying some code at runtime. Consider that you have a class
112112with a function called ``get_info `` which calls an API and returns the
113113response data. If we want to test it we can replace the API call with
0 commit comments