Repository navigation
v0.1.0
0.1.0 (2025-11-16)
First release.
Features
-
Result Type Pattern Implementation:
Ok[T]- Represents successful values with type safetyErr[E]- Represents error values with exception constraintsResult[T, E]- Type alias for union of Ok and Err types
-
Core Functionality:
.valueproperty - Access the wrapped value (Ok) or None (Err).errorproperty - Access the wrapped error (Err) or None (Ok).unwrap_value()method - Extract value or raise UnwrapError if Err.unwrap_error()method - Extract error or raise UnwrapError if Ok
-
Python Integration:
- Proper
__repr__,__eq__,__ne__,__hash__implementations - Boolean evaluation (Ok is truthy, Err is falsy)
- Pattern matching support via
__match_args__ isinstancehelper withResultOptiontuple
- Proper
-
Error Handling:
- Custom
UnwrapErrorexception for unwrap operations - Proper exception chaining for Err unwrap_value calls
- Access to original Result via
.resultproperty on UnwrapError
- Custom
-
Memory Efficiency:
__slots__optimization for reduced memory footprint- Minimal object overhead with single
_valueslot per instance