#
# My attempt at Smalltalk-like dependency setup


class Dependable:
    def __init__(self, dependents=[]):
        self.dependents = []
        self.dependents.extend(dependents)

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)

        return value

    def addDependent(self, who):
        self.dependents.append(who)

    def removeDependent(self, who):
        self.dependents.remove(who)
        
        

8cc989b63374baac416e94c2dd44004669e0fc1d
class Dependable:
    <mask token>

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)
        return value
    <mask token>
    <mask token>

class Dependable:
    <mask token>

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)
        return value
    <mask token>

    def removeDependent(self, who):
        self.dependents.remove(who)

class Dependable:

    def __init__(self, dependents=[]):
        self.dependents = []
        self.dependents.extend(dependents)

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)
        return value
    <mask token>

    def removeDependent(self, who):
        self.dependents.remove(who)

class Dependable:

    def __init__(self, dependents=[]):
        self.dependents = []
        self.dependents.extend(dependents)

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)
        return value

    def addDependent(self, who):
        self.dependents.append(who)

    def removeDependent(self, who):
        self.dependents.remove(who)

#
# My attempt at Smalltalk-like dependency setup


class Dependable:
    def __init__(self, dependents=[]):
        self.dependents = []
        self.dependents.extend(dependents)

    def changed(self, aspect=None, value=None):
        for d in self.dependents:
            d.update(self, aspect, value)

        return value

    def addDependent(self, who):
        self.dependents.append(who)

    def removeDependent(self, who):
        self.dependents.remove(who)
        
        
