Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
At this point, we have a fairly full-featured class that generates and initializes instances, along with two new bits of behavior for processing instances (in the form of methods). So far, so good.
As it stands, though, testing is still a bit less convenient
than it needs to be—to trace our objects, we have to manually fetch
and print individual attributes (e.g., bob.name, sue.pay). It would be nice if displaying an
instance all at once actually gave us some useful information.
Unfortunately, the default display format for an instance object isn’t
very good—it displays the object’s class name, and its address in
memory (which is essentially useless in Python, except as a unique
identifier).