#!/usr/bin/env python

class Subject(object):


    def __init__(self):
        self.observers = []

    def subscrive(self, observer):
        self.observers.append(observer)

    def unsubscribe(self, observer):
        self.observers.remove(observer)

    def notify(self):
        for observer in self.observers:
            observer.update()

#!/usr/bin/env python

class Subject(object):


    def __init__(self):
        self.observers = []

    def subscribe(self, observer):
        self.observers.append(observer)

    def unsubscribe(self, observer):
        self.observers.remove(observer)

    def notify(self):
        for observer in self.observers:
            observer.update()

change function's name subscrive to subscribe