def register(selfuserobj)if userobj not in self _listofusersself _listofusers append(userobjdef unregister(selfuserobj)self _listofusers remove(userobjdef notifyall(self)for objects in self _listofusersobjects notify(self postnamedef writenewpost(selfpostname)user writes post self postname postname when submits the post is published and notification is sent to all self notifyall(class subscriberdef __init__(self)#make it uninheritable pass def notify(self)#override pass class user (subscriber)def notify(self,postname)print 'user notfied of new post %spostname class user (subscriber)def notify(selfpostname)print 'user notfied of new post %spostname class sistersites(subscriber)def __init__(self)self _sisterwebsites ["site ","site ","site "def notify(selfpostname)for site in self _sisterwebsitessend updates by any means print "sent nofication to site%ssite if __name__ ="__main__"techforum techforum(user user (user user ( www testingperspective com