We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This would simplify using extractOne for lists with items with no matches.
The text was updated successfully, but these errors were encountered:
I will still need to think about this change. I understand this can be helpful when doing:
a, b, c = extractOne(...)
However it has a couple of disadvantages as well:
if res := extractOne(...): a, b, c = res
In the long run I will probably guide people to this new API: #188 The final API is not clear yet, but this will likely raise a ValueError for an empty result, but allows the user to pass an initial value similar to numpy (https://numpy.org/doc/stable/reference/generated/numpy.amax.html#numpy.amax):
Compare(...).max() -> ValueError Compare(...).max(initial=(None, 0, None)) -> (None, 0, None)
Sorry, something went wrong.
Thank you
I use :
a, b, c = extractOne(...) or (None, 0, None)
Speaking of that, i'm not sure it's a good idea to return None for the number in the middle.
Sounds like a good solution to @John-Schreiber's problem.
No branches or pull requests
This would simplify using extractOne for lists with items with no matches.
The text was updated successfully, but these errors were encountered: