I hadn't thought about adding a get(). Good point. But it wouldn't be quite that short: get() returns `None` if the key isn't found, so the above would have to be...

```python
squares_of_odds = (x*x for x in buckets(a_bunch_of_ints, lambda y: y % 2).get(1, []))

return queues.get(True, []), queues.get(False, [])
```

I hadn't thought of `buckets` as a general mapping. I played with the idea of making it one tonight, adding all the methods from http://legacy.python.org/dev/peps/pep-3119/#mappings. However, that leads to a questionable outcome: most of the methods—`keys`, `items`, `values`, `__len__`, and `__iter__`—defeat `buckets`' laziness; they require it to read in and memorize all its input. It would be too easy for a caller to trip over those and hit out-of-memory situations.

So I don't have a clear leaning at the moment; I'll sleep on it and look forward to hearing what you think given the above 2 points.