Use try, except instead of checking __dict__.

This allows you to create subclasses of colour.Color, since __dict__ is not
inherited by subclasses.