underscore.py
underscore.py copied to clipboard
_.without fails on unicode string equality
>>> from underscore import _ as _underscore
>>> filter_fields = ['id', 'keyword']
>>> test_fields = [u'id', 'keyword', 'other']
>>> len(_underscore.without(test_fields, *filter_fields))
2
>>> len(_underscore.difference(test_fields, filter_fields)
1
Difference is behaving correctly in this case.