Oct. 27, 2004
3:59 p.m.
Why not mimic the pure python approach?
lowerfunc = PyObject_GetAttrString(&PyUnicode_Type, "lower"); PyObject_CallMethod(mylist, "sort", "OO", Py_None, lowerfunc);
unicode.lower() doesn't like non-unicode objects, so this would only work if you know for sure there are no str objects in the list. -- --Guido van Rossum (home page: http://www.python.org/~guido/)