Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

extract and extractOne fail if choices contains null strings #3

Closed
ciferkey opened this issue Jul 21, 2011 · 0 comments
Closed

extract and extractOne fail if choices contains null strings #3

ciferkey opened this issue Jul 21, 2011 · 0 comments

Comments

@ciferkey
Copy link

Extract and extractOne fail if choices contains either an empty string or a string of only whitespace. For example:

process.extract('string1', ['', 'string', ''])

and

process.extract('string1', [' ', 'string', ' '])

will traceback:

    len_ratio = float(max(len(p1),len(p2)))/min(len(p1),len(p2))

ZeroDivisionError: float division by zero

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

No branches or pull requests

2 participants