Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement as_maybe and as_async_maybe #1

Open
francium opened this issue Aug 27, 2023 · 2 comments
Open

Implement as_maybe and as_async_maybe #1

francium opened this issue Aug 27, 2023 · 2 comments

Comments

@francium
Copy link
Member

We may need to think about if the semantics differ in the context of a Maybe vs a Result

@demetere
Copy link

I think this will be great but as I understand it will be only handling None or Values, it does not have anything to do with Exceptions right? I can also help implementing this if required

@francium
Copy link
Member Author

francium commented Jun 1, 2024

Hi demetere, no nothing to do with exceptions. I don't think they make sense in this context since we're dealing with optional values here. The use case we're covering here is converting a function like this def foo(...) -> Optional[T] into def foo(...) -> Maybe[T]

If you're interested in helping out, please do feel free to take this on. Refer to the as_result implementation in the Result repo as a starting point.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants