[Python-Dev] adding Py{String|Unicode}_{Lower|Upper} and fixing CreateProcess in _subprocess.pyd and PyWin32

"Martin v. Löwis" martin at v.loewis.de
Wed Oct 27 08:59:47 CEST 2004

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().


More information about the Python-Dev mailing list