Radomir Dopieralski  committed da968a3

Fix more typos in the "What do you need to know about Pytthon" section

  • Participants
  • Parent commits 9d02f79

Comments (0)

Files changed (1)

File source/know-in-python.rst

 .. code-block:: python
-    def average(\*args):
+    def average(*args):
         total = 0
         for arg in args:
             total += arg
 .. code-block:: python
-    def get_arguments(\*args, \*\*kwargs):
+    def get_arguments(*args, **kwargs):
         return args, kwargs
     get_argumenst(1, 2, 3, four=5)
     my_list = [1, 2, 3]
     my_dict = {'four': 5}
-    get_arguments(\*my_list, \*\*my_dict)
+    get_arguments(*my_list, **my_dict)
 In JavaScript there are other mechanisms for doing that: the *arguments* keyword
 has the list of all parameters passed to a function. These are all positional arguments, JavaScript doesn't have keyword arguments. The *apply* method of a function lets you pass an array of parameters in a function call.