adapter pattern the code does not look any differentother than having the default object instead of interfacesuperclass as parent class of the objectadapter class this means that we never have to define some super class to adapt one interface to another we followed the intent and spirit of the adapter pattern without all the run-around caused by lessdynamic languages rememberyou are not slave to the way things were defined in the classic texts of our field as technology grows and changesso too must wethe implementers of that technology our new version of the adapter pattern uses composition rather than inheritance to deliver more pythonic version of this structural design pattern thuswe do not require access to the source code of the interface class we are given thisin turnallows us to not violate the open/closed principle proposed by bertrand meyercreator of the eiffel programming languageand the idea of design by contract the open/closed principle statessoftware entities (classesmodulesfunctionsetc should be open for extensionbut closed for modification you want to extend the behavior of an entity without ever modifying its source code when you want to learn something newespecially when it is not trivial bit of informationyou need to understand the information on deep level an effective strategy for gaining deeper understanding is to deconstruct the big picture into smaller parts and then simplify those into digestible chunks you then use these simple chunks to develop an intuitive sense of the problem and its solution once you gain confidence in your abilityyou let in more of the complexity once you have deep understanding of the partsyou continue to string them back togetherand you will find that you have much clearer sense of the whole you can use the process we just followed whenever you want to begin exploring new idea implementing the adapter pattern in the real world since you now have feel for clearpythonicimplementation of the adapter patternlet' apply that intuition to the case we looked at in the beginning of this we are going to create an adapter that will allow us to write text to the command line in order to show you what the adapter pattern looks like in action as part of the exercisesyou will be challenged to create an adapter to one of the social network libraries for python and integrate that with the code that follows