Outline for October 19, 2012

Reading: none
Assignment Due: October 24, 2012 at 5:00PM


  1. Announcement from the Student Disability Center: notetakers needed for this class
    The Student Disability Center asks that students interested in serving as paid notetakers for this course please contact Russ Zochowski at rjzochowski@ucdavis.edu. Notetakers are paid a stipend of $25 per unit, but must have a social security number in order to be paid. Students are asked to put notetaker, the course title, number, and instructor’s name in the subject lines of their emails. Their information will be passed along to the SDC student in need of notes, and if they are interested they will contact each student accordingly. Thank you in advance for your time and consideration
  2. Handling exceptions
    1. except [except0.py]
    2. except error [except1.py]
    3. else [except2.py]
    4. except error as msgvar [except3.py]
    5. finally [except4.py]
    6. Exceptions in a function: who handles them? [except5.py, except6.py]
    7. raise [except7.py]
  3. Common exceptions
    1. ZeroDivisionError — attempt to divide (or take the remainder of) something by 0
    2. TypeError — operation or function applied to operand of wrong type
    3. SyntaxError — Python parser encountered a malformed statement
    4. NameError — local or global name is not found
    5. ValueError — built-in function or operation applied to operator with illegal value
    6. EOFError — input function encounters an end of file
    7. Keyboard Interrupt — user hit the interrupt key (usually control-C)

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Fall Quarter 2012