Python Objects, Classes, Exceptions




CS156

Chris Pollett

Sep 15, 2014

Outline

Introduction

Objects and Classes

Inheritance, static methods, abstract classes.

Tic-tac-toe Board Example

Quiz

Which of the following is true?

  1. In `A^star` search the frontier nodes are stored in a priority queue ordered by `f = c + h`.
  2. Python has a switch/case construct.
  3. To define a function in Python we use the Python keyword function.

Exceptions

Modules

Documentation Strings and Help

Unit Tests

doctest