Skip to content

Some small fixes #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion io.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ loop. This method returns a complete line including the newline character at the
line. When an _empty_ string is returned, it means that we have reached the end of the file and we
'break' out of the loop.

In the end, we finally `close`the file.
In the end, we finally `close` the file.

Now, check the contents of the `poem.txt` file to confirm that the program has indeed written to
and read from that file.
Expand Down
2 changes: 1 addition & 1 deletion modules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ A note on `del` - this statement is used to *delete* a variable/name and after t
run, in this case `del a`, you can no longer access the variable `a` - it is as if it never existed
before at all.

Note that the `dir()` function works on *any* object. For example, run `dir('print')` to learn
Note that the `dir()` function works on *any* object. For example, run `dir(print)` to learn
about the attributes of the print function, or `dir(str)` for the attributes of the str class.

There is also a http://docs.python.org/2/library/functions.html#vars[`vars()`] function which can
Expand Down
2 changes: 1 addition & 1 deletion oop.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ include::programs/oop_objvar.txt[]
.How It Works

This is a long example but helps demonstrate the nature of class and object variables. Here,
`population` belongs to the`Robot` class and hence is a class variable. The `name` variable belongs
`population` belongs to the `Robot` class and hence is a class variable. The `name` variable belongs
to the object (it is assigned using `self`) and hence is an object variable.

Thus, we refer to the `population` class variable as `Robot.population` and not as
Expand Down
2 changes: 1 addition & 1 deletion problem_solving.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ a `-v` option to make your program become more talkative or a `-q` to make it _q

Another possible enhancement would be to allow extra files and directories to be passed to the
script at the command line. We can get these names from the `sys.argv` list and we can add them to
our `source` list using the `extend`method provided by the `list` class.
our `source` list using the `extend` method provided by the `list` class.

The most important refinement would be to not use the `os.system` way of creating archives and
instead using the http://docs.python.org/2/library/zipfile.html[zipfile] or
Expand Down