Python 3 porting:  lru_cache

For when pull request #237 is done.