Trent Mick wrote: > 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. > > Does that sound reasonable? Is there some problem to this approach that > anyone can see? Here we go. Exposing PyString_Lower would be a new feature, we are in beta, so new features are not acceptable. That said, I personally could accept such a feature (exposing more C API) quite well between the beta and the final release. That said, I think exposing PyString_Lower would not be desirable (whether now or later). Instead, you should use PyObject_CallMethod to invoke .lower(). Regards, Martin
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