> However, I'd like some guidance on the best way to case-insensitively > sort a Python list in C code to fix (B). The best thing I see would be > to expose PyString_Lower/PyUnicode_Lower and/or > PyString_Upper/PyUnicode_Upper so they can be used to .lower()/.upper() > the given environment mapping keys for sorting. Why not mimic the pure python approach? lowerfunc = PyObject_GetAttrString(&PyUnicode_Type, "lower"); PyObject_CallMethod(mylist, "sort", "OO", Py_None, lowerfunc); Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4