I have some Python legacy code that looks like this:
except ValueError as e: new = DecodingError( "Failed to decode value {!r} for field {}, got: {}".format( raw_value, field_name, e ) ) six.reraise(DecodingError, new, sys.exc_info()[2]) Everything is on Python 3 so I don't need six anymore and would like to remove that dependency. But I don't understand what reraise does and how I can replace it with native Python 3 syntax. I don't find the explanation in the docs to be much help.
What should I replace six.reraise(...) with in Python 3?
raise new from e