7 ms·
> Sorting out what was returned requires a "match" statement You can unwrap it if you want an error. Or use a helper function if there is a default to provide.
by mercurial 12y ago
> Sorting out what was returned requires a "match" statement
You can unwrap it if you want an error. Or use a helper function if there is a default to provide. But it explicitly makes clear that the function can fail, and leaves error handling to the consumer. The Python version gives no indication that something may go wrong.