Python适配器模式,代码,思考等
# -*- coding: utf-8 -*-
# author:baoshan
class Computer:
def __init__(self, name):
self.name = name
def __str__(self):
return 'the {} computer'.format(self.name)
def execute(self):
return 'executes a program'
class Synthesizer:
def __init__(self, name):
se