I\'m aware of raise ... from None and have read How can I more easily suppress previous exceptions when I raise my own exception in response?.
raise ... from None
However,
You can try suppressing the context yourself:
try: value = cache_dict[key] except KeyError: try: value = some_api.get_the_value_via_web_service_call(key) except Exception as e: e.__context__ = None raise cache_dict[key] = value