python-result-pattern
Implement the Result[T] = Union[Success[T], Failure] pattern for explicit, type-safe error handling in Python. Use this skill when writing service methods that can fail, adding new error codes, refactoring try/except blocks, or implementing Railway-Oriented Programming patterns. This pattern replaces exceptions for control flow, making errors explicit in function signatures.
Installation and usage
Implement the Result[T] = Union[Success[T], Failure] pattern for explicit, type-safe error handling in Python. Use this skill when writing service methods that can fail, adding new error codes, refactoring try/except blocks, or implementing Railway-Oriented Programming patterns. This pattern replaces exceptions for control flow, making errors explicit in function signatures.
安装后,您可以通过在终端运行以下命令来使用此技能:
skills use python-result-pattern