Skip to content

Commit 1acb772

Browse files
committed
updated presentations..
1 parent 1c3c660 commit 1acb772

File tree

5 files changed

+589
-472
lines changed

5 files changed

+589
-472
lines changed

slides_sources/source/exercises/file_lab.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ Paths and File Processing
2525
- advanced: make it work for any size file: i.e. don't read the entire
2626
contents of the file into memory at once.
2727

28-
- Note that if you want it to do any kind of file, you need to open the files in binary mode:
29-
``open(filename, 'rb')`` (or ``'wb'`` for writing.)
28+
- This should work for any kind of file, so you need to open
29+
the files in binary mode: ``open(filename, 'rb')`` (or ``'wb'`` for
30+
writing). Note that for binary files, you can't use ``readline()`` --
31+
lines don't have any meaning for binary files.
32+
33+
- Test it with both text and binrary files (maybe jpeg or??)
3034

3135

3236
File reading and parsing

slides_sources/source/session05.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,11 +721,13 @@ Example
721721
LAB
722722
===
723723
724-
List comps exercises:
724+
Here is a nice tutorial on list comprehensions:
725725
726-
:ref:`exercise_comprehensions`
726+
http://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/
727727
728+
List comps exercises:
728729
730+
:ref:`exercise_comprehensions`
729731
730732
731733
@@ -758,9 +760,9 @@ Material to review before next week:
758760
* Dive into Python: chapter 9:
759761
http://www.diveintopython3.net/unit-testing.html
760762
761-
NOTE: you will find that most introductions to unit testing with Python use the builtin ``unitest`` module. However, it is a bit heavyweight, and requires some knowledge of OOP -- classes, etc. So we'll be using pytest in this class: http://doc.pytest.org/en/latest/. But the principles of testing are the same.
763+
NOTE: you will find that most introductions to unit testing with Python use the builtin ``unitest`` module. However, it is a bit heavyweight, and requires some knowledge of OOP -- classes, etc. So we'll be using pytest in this class: http://doc.pytest.org/en/latest/. But the principles of testing are the same.
762764
763-
* Ned Batchelder's into to testing presentation:
765+
* Ned Batchelder's intro to testing presentation:
764766
765767
- http://nedbatchelder.com/text/test0.html
766768

0 commit comments

Comments
 (0)