def update(self, iterable=None, **kwds):
        # The regular dict.update() operation makes no sense here because the
        # replace behavior results in the some of original untouched counts
        # being mixed-in with all of the other counts for a mismash that
        # doesn't have a straight-forward interpretation in most counting
        # contexts.  Instead, we implement straight-addition.  Both the inputs
        # and outputs are allowed to contain zero and negative counts.

        if iterable is not None:
            if isinstance(iterable, Mapping):
                if self:
                    self_get = self.get
                    for elem, count in iterable.iteritems():
                        self[elem] = self_get(elem, 0) + count
                else:
                    super(Counter, self).update(iterable) # fast path when counter is empty
            else:
                self_get = self.get
                for elem in iterable:
                    self[elem] = self_get(elem, 0) + 1
        if kwds:
            self.update(kwds)
Applies smarty pants to curl quotes.
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/counter.py/Counter.update--crossover with--dataset/ETHPy150Open callowayproject/django-typogrify/typogrify/templatetags/typogrify.py/smartypants_filter