we now turn our attention to our last major topic related to writing programs in pythonusing classes to organize programs around modules and data abstractions classes can be used in many different ways in this book we emphasize using them in the context of object-oriented programming the key to objectoriented programming is thinking about objects as collections of both data and the methods that operate on that data the ideas underlying object-oriented programming are about forty years oldand have been widely accepted and practiced over the last twenty years or so in the mid- people began to write articles explaining the benefits of this approach to programming about the same timethe programming languages smalltalk (at xerox parcand clu (at mitprovided linguistic support for the ideas but it wasn' until the arrival of +and java that it really took off in practice we have been implicitly relying on object-oriented programming throughout most of this book back in section we said "objects are the core things that python programs manipulate every object has type that defines the kinds of things that programs can do with objects of that type since we have relied heavily upon built-in types such as list and dict and the methods associated with those types but just as the designers of programming language can build in only small fraction of the useful functionsthey can only build in only small fraction of the useful types we have already looked at mechanism that allows programmers to define new functionswe now look at mechanism that allows programmers to define new types abstract data types and classes the notion of an abstract data type is quite simple an abstract data type is set of objects and the operations on those objects these are bound together so that one can pass an object from one part of program to anotherand in doing so provide access not only to the data attributes of the object but also to operations that make it easy to manipulate that data the specifications of those operations define an interface between the abstract data type and the rest of the program the interface defines the behavior of the operations--what they dobut not how they do it the interface thus provides an abstraction barrier that isolates the rest of the program from the data structuresalgorithmsand code involved in providing realization of the type abstraction programming is about managing complexity in way that facilitates change there are two powerful mechanisms available for accomplishing thisdecomposition and abstraction decomposition creates structure in programand abstraction suppresses detail the key is to suppress the appropriate