Browse Source

Small fixes

Pointed out by yejianfeng.blue@gmail.com - thanks!
Swaroop C H 11 years ago
parent
commit
33ec8e4fd5
3 changed files with 7 additions and 11 deletions
  1. 1 1
      exceptions.asciidoc
  2. 4 4
      modules.asciidoc
  3. 2 6
      op_exp.asciidoc

+ 1 - 1
exceptions.asciidoc

@@ -107,7 +107,7 @@ Here, we are creating our own exception type. This new exception type is called
 
 In the `except` clause, we mention the class of error which will be stored `as` the variable name
 to hold the corresponding error/exception object. This is analogous to parameters and arguments in
-a function call. Within this particular `except` clause, we use the`length` and `atleast` fields of
+a function call. Within this particular `except` clause, we use the `length` and `atleast` fields of
 the exception object to print an appropriate message to the user.
 
 === Try ... Finally

+ 4 - 4
modules.asciidoc

@@ -61,9 +61,9 @@ passed to the program. Python stores the command line arguments in the `sys.argv
 to use.
 
 Remember, the name of the script running is always the first argument in the `sys.argv` list. So,
-in this case we will have `'using_sys.py'` as `sys.argv[0]`, `'we'` as `sys.argv[1]`, `'are'` as
-`sys.argv[2]` and `'arguments'` as `sys.argv[3]`. Notice that Python starts counting from 0 and
-not 1.
+in this case we will have `'module_using_sys.py'` as `sys.argv[0]`, `'we'` as `sys.argv[1]`,
+`'are'` as `sys.argv[2]` and `'arguments'` as `sys.argv[3]`. Notice that Python starts counting
+from 0 and not 1.
 
 The `sys.path` contains the list of directory names where modules are imported from. Observe that
 the first string in `sys.path` is empty - this empty string indicates that the current directory is
@@ -192,7 +192,7 @@ You could also use:
 from mymodule import *
 --------------------------------------------------
 
-This will import all public names such as `sayhi` but would not import `__version__` because it
+This will import all public names such as `say_hi` but would not import `__version__` because it
 starts with double underscores.
 
 WARNING: Remember that you should avoid using import-star, i.e. `from mymodule import *`.

+ 2 - 6
op_exp.asciidoc

@@ -51,12 +51,8 @@ Returns x to the power of y
 `/` (divide) ::
 Divide x by y
 +
-`13 / 3` gives `4.333333333333333`.
-
-`//` (floor division) ::
-Returns the floor of the quotient
-+
-`13 // 3` gives `4`.
+`13 / 3` gives `4`.
+`13.0 / 3` gives `4.333333333333333`
 
 `%` (modulo) ::
 Returns the remainder of the division