seatgeek / fuzzywuzzy

Fuzzy String Matching in Python
http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
GNU General Public License v2.0
9.23k stars 875 forks source link

Extract arbitrary objects #192

Open the01 opened 6 years ago

the01 commented 6 years ago

It used to be possible to match arbitrary objects (e.g. classes) with extractWithoutOrder() (extract(), extractBest(),..) by providing a custom scorer and processor. But this check limits matching to only strings (or implementing __len__())

My workaround is having the processor wrap an element in a list and strip that away again in the scorer.

Since the docstring does not specify it being limited to strings (only for the default scorer), I think this might be a bug or at least an error in the docu. Or is there a better approach to my scenario?