Added
- Added method `Maybe.as_list()`
- Replicates Rust's [`Option::as_mut_slice`](https://doc.rust-lang.org/std/option/enum.Option.html#method.as_mut_slice)
- Added method `Maybe.as_tuple()`
- Replicates Rust's [`Option::as_slice`](https://doc.rust-lang.org/std/option/enum.Option.html#method.as_slice)
- Added classvar `NothingType._exists`
- Added function `maybe_exc()`
- Added overloads for `maybe()` to indicate that `maybe(None)` returns `NothingType`
Changed
- `Some` now supports wrapping `None`
- `Maybe.__bool__()` now checks whether itself `is Nothing` rather than checking the wrapped value
- All `self._val is not None` checks have been replaced with simply checking the truthiness of
`self`, making the statement that `Some` instances are all truthy and `Nothing` is falsy more
accurate
- `MaybeInstanceWarning` renamed to `MaybeInitError` and is now an exception
- Directly instancing `Maybe()` raises this error
- `NothingTypeInitWarning` renamed to `NothingTypeInitError` and is now an exception
- Directly instancing `NothingType()` after it has already been instanced raises this error
- `ResultInstanceWarning` renamed to `ResultInitError` and is now an exception
- Directly instancing `Result()` raises this error
- `Maybe` and `Result` methods no longer call `self.unwrap()`, instead accessing `self._val`
directly which is much faster, all usages of `self.unwrap()` had already checked for `Nothing`
- The existence of a `NothingType` instance is now checked in `NothingType.__new__()` instead of
`__init__()`, and a `bool` is used instead of an `int`
- Docstring for `Maybe.cast()` made more succinct
- Shortened description for parameter `err` in `Maybe.get()` docstring
- Parameter `accessor` of `Maybe.get()` is now typed as `object` instead of `Any`
- `Maybe.get()` no longer calls function `maybe()`, uses ternary to decide default return value
- Parameter `default` of `Maybe.get()` now defaults to `...` and takes a type `U | EllipsisType`
instead of `U | None` since `None` is now a supported `Some` value
Removed
- Removed module `const`
- Removed staticmethod `Maybe.try_int()`
- Removed classvar `NothingType._init_count`
- Removed method `Maybe.bind()`
- Equivalent to `Maybe.and_then()`