diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-12 20:25:41 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-12 20:25:41 (GMT) |
commit | 0c91392fe6eca0c4b45913645f046536d0f53d19 (patch) | |
tree | b300006715989aab9103caf5d07c587b9f245f94 | |
parent | 70d62b30e4ef90f22125d928a270ef22b453a277 (diff) | |
download | cpython-0c91392fe6eca0c4b45913645f046536d0f53d19.zip cpython-0c91392fe6eca0c4b45913645f046536d0f53d19.tar.gz cpython-0c91392fe6eca0c4b45913645f046536d0f53d19.tar.bz2 |
kill capwords implementation which has been disabled since the begining
-rw-r--r-- | Objects/unicodeobject.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index cff97f7..6979050 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -10499,44 +10499,6 @@ unicode_capitalize(PyObject *self) return case_operation(self, do_capitalize); } -#if 0 -PyDoc_STRVAR(capwords__doc__, - "S.capwords() -> str\n\ -\n\ -Apply .capitalize() to all words in S and return the result with\n\ -normalized whitespace (all whitespace strings are replaced by ' ')."); - -static PyObject* -unicode_capwords(PyObject *self) -{ - PyObject *list; - PyObject *item; - Py_ssize_t i; - - /* Split into words */ - list = split(self, NULL, -1); - if (!list) - return NULL; - - /* Capitalize each word */ - for (i = 0; i < PyList_GET_SIZE(list); i++) { - item = fixup(PyList_GET_ITEM(list, i), - fixcapitalize); - if (item == NULL) - goto onError; - Py_DECREF(PyList_GET_ITEM(list, i)); - PyList_SET_ITEM(list, i, item); - } - - /* Join the words to form a new string */ - item = PyUnicode_Join(NULL, list); - - onError: - Py_DECREF(list); - return item; -} -#endif - /* Argument converter. Coerces to a single unicode character */ static int @@ -13075,10 +13037,6 @@ static PyMethodDef unicode_methods[] = { METH_VARARGS | METH_STATIC, maketrans__doc__}, {"__sizeof__", (PyCFunction) unicode__sizeof__, METH_NOARGS, sizeof__doc__}, #if 0 - {"capwords", (PyCFunction) unicode_capwords, METH_NOARGS, capwords__doc__}, -#endif - -#if 0 /* These methods are just used for debugging the implementation. */ {"_decimal2ascii", (PyCFunction) unicode__decimal2ascii, METH_NOARGS}, #endif |