mojo
mojo copied to clipboard
[Feature Request] Remove `__and__`, `__or__` etc. from `Optional` and `OptionalReg`
Review Mojo's priorities
- [X] I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
As title.
What is your motivation for this change?
They correspond to &
and |
which I don't think anyone will (or should) use. Besides, their functionality is already covered by o and/or b
where o: Optional[T]
and b: Boolable
.
__invert__
is also that useful, since both not o
and o is not None
will work.
Any other details?
__iand__
and __ior__
maybe useful as monadic operations, and I think we should add them.