data converter(datawriter write(databy passing in instances of subclasses that specialize the required read and write method interfaces for various data sourceswe can reuse the processor function for any data source we need to useboth now and in the futureclass readerdef read(self)default behavior and tools def other(self)class filereader(reader)def read(self)read from local file class socketreader(reader)def read(self)read from network socket processor(filereader)converterfilewriter)processor(socketreader)convertertapewriter)processor(ftpreader)converterxmlwriter)moreoverbecause the internal implementations of those read and write methods have been factored into single locationsthey can be changed without impacting code such as this that uses them the processor function might even be class itself to allow the conversion logic of converter to be filled in by inheritanceand to allow readers and writers to be embedded by composition (we'll see how this works later in this part of the bookprogramming by customization once you get used to programming this way (by software customization)you'll find that when it' time to write new programmuch of your work may already be done --your task largely becomes one of mixing together existing superclasses that already implement the behavior required by your program for examplesomeone else might have written the employeereaderand writer classes in this section' examples for use in completely different programs if soyou get all of that person' code "for free in factin many application domainsyou can fetch or purchase collections of superclassesknown as frameworksthat implement common programming tasks as classesready to be mixed into your applications these frameworks might provide database interfacestesting protocolsgui toolkitsand so on with frameworksyou often simply code subclass that fills in an expected method or twothe framework classes higher in the tree do most of the work for you programming in such an oop world is just matter of combining and specializing already debugged code by writing subclasses of your own of courseit takes while to learn how to leverage classes to achieve such oop utopia in practiceobject-oriented work also entails substantial design work to fully realize the code reuse benefits of classes--to this endprogrammers have begun cataloging common oop structuresknown as design patternsto help with design issues the actual code you write to do oop in pythonthoughis so simple that it will not in itself oopthe big picture