abstracting-fastapi-services icon indicating copy to clipboard operation
abstracting-fastapi-services copied to clipboard

Why to use "with" statement for raising errors?

Open david-shiko opened this issue 3 years ago • 1 comments

https://github.com/visini/abstracting-fastapi-services/blob/adacaba43609a0f46d1baf315d0288ae1a6c3d33/app/utils/service_result.py#L41

david-shiko avatar Jan 21 '22 02:01 david-shiko

I don't understand either. It didn't come across as obvious to me that we had to use a context manager for this case. We even only have 'pass' in the exit( ) method.

JohannSuarez avatar Jan 25 '22 08:01 JohannSuarez