Skip to content

Commit 42fec67

Browse files
authored
changed wording on *args (yasoob#210)
* changed wording * Update args_and_kwargs.rst
1 parent 2002172 commit 42fec67

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

args_and_kwargs.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
I have come to see that most new python programmers have a hard time
55
figuring out the \*args and \*\*kwargs magic variables. So what are they
6-
? First of all let me tell you that it is not necessary to write \*args
6+
? First of all, let me tell you that it is not necessary to write \*args
77
or \*\*kwargs. Only the ``*`` (asterisk) is necessary. You could have
88
also written \*var and \*\*vars. Writing \*args and \*\*kwargs is just a
99
convention. So now let's take a look at \*args first.
@@ -12,12 +12,11 @@ Usage of \*args
1212
^^^^^^^^^^^^^^^
1313

1414
\*args and \*\*kwargs are mostly used in function definitions. \*args
15-
and \*\*kwargs allow you to pass a variable number of arguments to a
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
18-
so in this case you use these two keywords. \*args is used to send a
19-
**non-keyworded** variable length argument list to the function. Here's
20-
an example to help you get a clear idea:
15+
and \*\*kwargs allow you to pass an unspecified number of arguments to a
16+
function, so when writing the function definition, you do not need to
17+
know how many arguments will be passed to your function. \*args is used to
18+
send a **non-keyworded** variable length argument list to the function.
19+
Here's an example to help you get a clear idea:
2120

2221
.. code:: python
2322

0 commit comments

Comments
 (0)