Changed function sematics of dict to be more strict.

Will now KeyError on missing key.
Fixed @retry in python 3