You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a similar issue also with obj.member = None; maybe(obj).member.get().
I think the root cause is maybe(None).get() raises.
To me it's more logical to have maybe(None).get() == None.
This can be done if we update the code to have maybe(None) == Something(None).
pip install pymaybe
maybe([None])[0].is_none()
is True.maybe([None])[0].get()
raises Exception, despite[None][0]
is None.maybe({'a': None})['a'].get()
raises Exception, despite{'a': None}['a']
is None.https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/
Despite being a maybe "implementation", this library fails to distinguish a missing element from a deliberate None value.
The text was updated successfully, but these errors were encountered: