For what it's worth, this solution is almost twice as slow as the `defaultdict` hack, but I don't expect this assignment to dominate anywhere we use it:
```
%timeit a=AutoIncrementer(); sum(a[k] for k in range(100000))
10 loops, best of 3: 66.1 ms per loop
```