Ya, very +1 for that debugging help. Although I would implement it:

```python
result = fn(*args, **kwargs)
try:
    cache[key] = result
except TypeError:
    for name, arg in chain(enumerate(args), kwargs.iteritems()):
        try:
            hash(arg)
        except TypeError:
            raise TypeError(("argument %r cannot be an argument to memoized "
                             "function %r: %r is not hashable")
                             %(name, fn, arg))
    raise
```

This way we don't accidentally catch a `TypeError` which might be raised by the `fn`, and give a bit more information about the argument. Also, plz2never use `str` in diagnostic messages (`str(42) == str("42") == str(TheAnswer())`) ;)