Next / Previous / Contents / Shipman's homepage

10. class Box: Rectangle object

See Section 4.4, “class Box: Define a rectangle”.

fohelpers.py
# - - - - -   c l a s s   B o x

class Box(object):
    '''Represents the dimensions of a rectangle.

      Exports:
        Box(wide, high):
          [ wide and high are FoDim instances ->
              return a new Box representing those dimensions ]
        .wide:      [ as passed to constructor ]
        .high:      [ as passed to constructor ]
        .__str__(self):   [ return self as a string ]
    '''