Treat objects as objects
This may seem obvious, but you should generally give separate objects in your problem domain a special class in your code. We've seen examples of this in the case studies in previous chapters; the process is generally to identify objects in the problem and then model their data and behaviors.
Identifying objects is a very important task in object-oriented analysis and programming. But it isn't always as easy as counting the nouns in a short paragraph, as we've been doing. Remember, objects are things that have both data and behavior. If we are working with only data, we are often better off storing it in a list, set, dictionary, or some other Python data structure (which we'll be covering thoroughly in the next chapter). On the other hand, if we are working with only behavior, with no stored data, a simple function is more suitable.
An object, however, has both data and behavior. Most Python programmers use built-in data structures unless (or until) there is an obvious...