Repository navigation
Releases
Releases · john-parton/result
v0.19.0
[fixed]Lambdas passed to methods on aResult(for example
result.map(lambda v: ...)) no longer have unknown parameter types on the
Ok/Errside that ignores them, which strict checkers reported
(pyrightreportUnknownLambdaType, pyreflyimplicit-any-lambda). Ignored
opparameters are now typedCallable[[Never], object] | object, so the
lambda's parameter isNeveron that side (it disappears when joined with
the real type) andErr("x").map(42)is still accepted
v0.18.0
First release of the john-parton/result
fork of rustedpy/result, which is no longer maintained. It is not published to
PyPI; install it from the v0.18.0 tag (see the README). This release contains
breaking changes; the README has a migration guide.
[changed]Requires Python 3.12+ (upstream supported 3.8+); the code uses
PEP 695 generics and thetypestatement[changed]OkandErrare frozen, slotted dataclasses. The value is a
public field (ok_value/err_value), passed positionally only, and the
private_valueattribute is gone.repr()is nowOk(ok_value=1),
equality requires the same class, andhash(Ok(x)) == hash(Err(x))[changed]Result[T, E]is atypealias (Ok[T] | Err[E]) rather than a
typing.Union, so it can no longer be passed toisinstance; use
isinstance(r, (Ok, Err))orOkErr[removed]as_async_resultandas_result. Use an explicittry/except
returningOk/Errinstead (see the README)[removed]Do notation (do(),do_async(),DoException) and the
__iter__methods onOkandErrthat supported it[removed]is_ok()andis_err()type guard functions; usematchor
isinstance. The.is_ok()and.is_err()methods remain[removed]Thetyping_extensionsdependency, which was only needed for
TypeIs; the package now has no runtime dependencies[deprecated].valueremains deprecated (since 0.11.0); use.ok_valueor
.err_value[added]Documentation built with Sphinx and published to GitHub Pages;
result.__version__is read from the package metadata[changed]Development tooling: uv, ruff and pyrefly replace setuptools,
tox, flake8 and mypy; the mypy plugin type tests are removed