You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sort_spec = (('k2', False, False), ('k1', False, True))
for item in multisort_list_of_dicts(data, sort_spec):
print(item)
this obviously cannot work, because sort_key() expects a string:
def sort_key(self, string):
File "C:\Programs\Python\Python311\Lib\site-packages\pyuca\collator.py", line 119, in sort_key
normalized_string = unicodedata.normalize("NFD", string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: normalize() argument 2 must be str, not operator.itemgetter
Thank you for a great library!
I would like to sort a list of dicts by multiple values - some possibly in Unicode - sample program:
Standard sorting:
Unicode sorting for k1:
this obviously cannot work, because sort_key() expects a string:
def sort_key(self, string):
How to get the desired output with pyuca ?
How to possibly handle the itemgetter input in pyuca ?
The text was updated successfully, but these errors were encountered: