summaryrefslogtreecommitdiff
path: root/advanced_python/modules.rst
diff options
context:
space:
mode:
authorJovina2011-09-13 16:30:42 +0530
committerJovina2011-09-13 16:30:42 +0530
commit257dd79386cea651b45f67885e0bf3850681252c (patch)
tree7313ffea194674a2d630a2d87a035059952930f9 /advanced_python/modules.rst
parent483021b097addf9aad7cce7fb53a3bbc9f55ffec (diff)
downloadsees-257dd79386cea651b45f67885e0bf3850681252c.tar.gz
sees-257dd79386cea651b45f67885e0bf3850681252c.tar.bz2
sees-257dd79386cea651b45f67885e0bf3850681252c.zip
Minor changes to 'advanced python'.
Diffstat (limited to 'advanced_python/modules.rst')
-rw-r--r--advanced_python/modules.rst10
1 files changed, 4 insertions, 6 deletions
diff --git a/advanced_python/modules.rst b/advanced_python/modules.rst
index 8932778..833334d 100644
--- a/advanced_python/modules.rst
+++ b/advanced_python/modules.rst
@@ -91,8 +91,8 @@ Yes! it worked. So what did we do?
We actually imported the required functions and keywords, using ``import``.
By using the *, we are asking python to import everything from the
``scipy`` and ``pylab`` modules. This isn't a good practice, as
- 1. it imports a lot of unnecessary things
- 2. the two modules may have functions with the same name, which would
+1. it imports a lot of unnecessary things
+2. the two modules may have functions with the same name, which would
cause a conflict.
One of the ways out is to import only the stuff that we need, explicitly.
@@ -174,8 +174,7 @@ Often we will have to reuse the code that we have previously written. We do
that by writing functions. Functions can then be put into modules, and
imported as and when required.
-Let us first write a function that computes the gcd of two numbers and save
-it in a script.
+Let us first write a function that computes the gcd of two numbers and save it in a script.
::
@@ -184,8 +183,7 @@ it in a script.
a, b = b, a%b
return a
-Now, we shall write a test function in the script that tests the gcd
-function, to see if it works.
+Now, we shall write a test function in the script that tests the gcd function, to see if it works.
::