Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

extract and extractOne fail if choices contains null strings #3

Closed
ciferkey opened this Issue · 0 comments

2 participants

@ciferkey

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 join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.