def update(self, changes):
    ' Changes is a dict mapping old whisker segments to new segments '
    last = None
    for (w, p) in changes.items():
        self.remove(w)
        if p:
            self.add(p[0])
            self.add(p[(- 1)])
            last = p[1]
    if last:
        self.add(last)
Changes is a dict mapping old whisker segments to new segments
def update(self, changes):
    '  '
    last = None
    for (w, p) in changes.items():
        self.remove(w)
        if p:
            self.add(p[0])
            self.add(p[(- 1)])
            last = p[1]
    if last:
        self.add(last)