@@ -49,7 +49,13 @@ Running programs from files
4949Installing new packages
5050-----------------------
5151
52- * Mention pip, easy_install and system package managers.
52+ .. todo :: mention pip, easy_install and system package managers.
53+
54+ Further reading
55+ ---------------
56+
57+ .. todo :: links to Python tutorial and documentation
58+
5359
5460Essentials of a Python program
5561==============================
@@ -396,14 +402,15 @@ followed by a newline is written to the file. The ``w`` character
396402passed to ``open `` indicates that the file should be opened for
397403writing.
398404
399- As an alternative to using ``print ``, files have a ``write `` method (a
400- function attached to the file object that can be accessed using the
401- ``. `` operator -- methods will be explained in more detail in the
402- chapter on object orientated programming) that can be used as follows::
405+ As an alternative to ``print ``, we can use a file's ``write ``
406+ method as follows::
403407
404408 with open('myfile.txt', 'w') as myfile:
405409 myfile.write("Hello!")
406410
411+ A method is a function attached to an object -- methods will be
412+ explained in more detail in the chapter about classes.
413+
407414Unlike ``print ``, the ``write `` method does add a newline to the
408415string written.
409416
@@ -420,8 +427,8 @@ indicates that the file should be opened for reading.
420427.. Note ::
421428
422429 Python will raise an error if you attempt to open a file that has
423- not been created yet for reading. Opening a file for writing that
424- will create the file if it does not exist yet.
430+ not been created yet for reading. Opening a file for writing will
431+ create the file if it does not exist yet.
425432
426433
427434Built-in types
@@ -857,12 +864,6 @@ In Python, strings are *immutable* -- that means that you can't modify
857864a string once it has been created. However, you can assign a new
858865string value to an existing variable name.
859866
860- .. Todo :: modules and tests are in a separate chapter -- should anything
861- be said here?
862-
863- .. Todo :: should this be split again into two chapters, with all the
864- string and number stuff in another chapter?
865-
866867.. Todo :: translate exercises
867868
868869.. Todo :: change you to we almost everywhere
0 commit comments