-
rustedpy result 소개python/result 2024. 1. 31. 15:34
- github: https://github.com/rustedpy/result
- python Exception 대신에 Result 타입으로 리턴하자.
- scala 의 Either 와 비슷
- dry-python 의 Result 와 비슷
Exception vs Result
- total function, explicit error check 등을 생각하면 Result 를 사용하는 것이 좋을 듯 한데..
- code 가 좀 더 복잡해(어려워) 지고, Exception 사용을 python convention 이라고 생각해 저항이 있는 것 같다.
토론 링크