Skip to content

Commit

Permalink
Merge pull request #116 from bbishop423/patch-3
Browse files Browse the repository at this point in the history
Update global_&_return.rst
  • Loading branch information
yasoob committed Mar 21, 2016
2 parents ddb33c5 + dc84d6e commit 8bd76fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions global_&_return.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case is ``result``. In most cases and you won't need to use the
which includes the ``global`` keyword. So what that function is doing is
that it is making a global variable ``result``. What does global mean
here? Global variable means that we can access that variable outside the
scope of the function as well. Let me demonstrate it with an example :
scope of the function as well. Let me demonstrate it with an example:

.. code:: python
Expand All @@ -47,7 +47,7 @@ scope of the function as well. Let me demonstrate it with an example :
add(2, 4)
print(result)
# Oh crap we encountered an exception. Why is it so ?
# Oh crap, we encountered an exception. Why is it so?
# the python interpreter is telling us that we do not
# have any variable with the name of result. It is so
# because the result variable is only accessible inside
Expand Down

0 comments on commit 8bd76fd

Please sign in to comment.