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

[FEATURE] COALESCE function #237

Closed
joocer opened this issue Jun 26, 2022 · 0 comments
Closed

[FEATURE] COALESCE function #237

joocer opened this issue Jun 26, 2022 · 0 comments
Assignees
Labels
Awaiting Closure Fixed - waiting for merging/releasing

Comments

@joocer
Copy link
Contributor

joocer commented Jun 26, 2022

def coalesce(iterable):
    for el in iterable: 
        if el is not None:
            return el
    return None

This needs to be adapted to handle if el is not an iterable (which should be the last item usually)

@joocer joocer self-assigned this Jun 26, 2022
@joocer joocer added the Awaiting Closure Fixed - waiting for merging/releasing label Jun 26, 2022
joocer added a commit that referenced this issue Jun 26, 2022
joocer added a commit that referenced this issue Jun 26, 2022
joocer added a commit that referenced this issue Jun 26, 2022
joocer added a commit that referenced this issue Jun 26, 2022
@joocer joocer closed this as completed Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Closure Fixed - waiting for merging/releasing
Projects
None yet
Development

No branches or pull requests

1 participant