Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Side by Side Diff: Objects/unicodeobject.c

Issue 8706: accept keyword arguments on all base type methods and builtins
Patch Set: Created 8 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Objects/stringlib/find.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 2
3 Unicode implementation based on original code by Fredrik Lundh, 3 Unicode implementation based on original code by Fredrik Lundh,
4 modified by Marc-Andre Lemburg <mal@lemburg.com>. 4 modified by Marc-Andre Lemburg <mal@lemburg.com>.
5 5
6 Major speed upgrades to the method implementations at the Reykjavik 6 Major speed upgrades to the method implementations at the Reykjavik
7 NeedForSpeed sprint, by Fredrik Lundh and Andrew Dalke. 7 NeedForSpeed sprint, by Fredrik Lundh and Andrew Dalke.
8 8
9 Copyright (c) Corporation for National Research Initiatives. 9 Copyright (c) Corporation for National Research Initiatives.
10 10
(...skipping 11062 matching lines...) Expand 10 before | Expand all | Expand 10 after
11073 } 11073 }
11074 11074
11075 PyDoc_STRVAR(count__doc__, 11075 PyDoc_STRVAR(count__doc__,
11076 "S.count(sub[, start[, end]]) -> int\n\ 11076 "S.count(sub[, start[, end]]) -> int\n\
11077 \n\ 11077 \n\
11078 Return the number of non-overlapping occurrences of substring sub in\n\ 11078 Return the number of non-overlapping occurrences of substring sub in\n\
11079 string S[start:end]. Optional arguments start and end are\n\ 11079 string S[start:end]. Optional arguments start and end are\n\
11080 interpreted as in slice notation."); 11080 interpreted as in slice notation.");
11081 11081
11082 static PyObject * 11082 static PyObject *
11083 unicode_count(PyObject *self, PyObject *args) 11083 unicode_count(PyObject *self, PyObject *args, PyObject *kwds)
11084 { 11084 {
11085 PyObject *substring; 11085 PyObject *substring;
11086 Py_ssize_t start = 0; 11086 Py_ssize_t start = 0;
11087 Py_ssize_t end = PY_SSIZE_T_MAX; 11087 Py_ssize_t end = PY_SSIZE_T_MAX;
11088 PyObject *result; 11088 PyObject *result;
11089 int kind1, kind2, kind; 11089 int kind1, kind2, kind;
11090 void *buf1, *buf2; 11090 void *buf1, *buf2;
11091 Py_ssize_t len1, len2, iresult; 11091 Py_ssize_t len1, len2, iresult;
11092 11092
11093 if (!stringlib_parse_args_finds_unicode("count", args, &substring, 11093 if (!stringlib_parse_args_finds_unicode("count", args, kwds, &substring,
11094 &start, &end)) 11094 &start, &end))
11095 return NULL; 11095 return NULL;
11096 11096
11097 kind1 = PyUnicode_KIND(self); 11097 kind1 = PyUnicode_KIND(self);
11098 kind2 = PyUnicode_KIND(substring); 11098 kind2 = PyUnicode_KIND(substring);
11099 kind = kind1 > kind2 ? kind1 : kind2; 11099 kind = kind1 > kind2 ? kind1 : kind2;
11100 buf1 = PyUnicode_DATA(self); 11100 buf1 = PyUnicode_DATA(self);
11101 buf2 = PyUnicode_DATA(substring); 11101 buf2 = PyUnicode_DATA(substring);
11102 if (kind1 != kind) 11102 if (kind1 != kind)
11103 buf1 = _PyUnicode_AsKind(self, kind); 11103 buf1 = _PyUnicode_AsKind(self, kind);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
11264 PyDoc_STRVAR(find__doc__, 11264 PyDoc_STRVAR(find__doc__,
11265 "S.find(sub[, start[, end]]) -> int\n\ 11265 "S.find(sub[, start[, end]]) -> int\n\
11266 \n\ 11266 \n\
11267 Return the lowest index in S where substring sub is found,\n\ 11267 Return the lowest index in S where substring sub is found,\n\
11268 such that sub is contained within S[start:end]. Optional\n\ 11268 such that sub is contained within S[start:end]. Optional\n\
11269 arguments start and end are interpreted as in slice notation.\n\ 11269 arguments start and end are interpreted as in slice notation.\n\
11270 \n\ 11270 \n\
11271 Return -1 on failure."); 11271 Return -1 on failure.");
11272 11272
11273 static PyObject * 11273 static PyObject *
11274 unicode_find(PyObject *self, PyObject *args) 11274 unicode_find(PyObject *self, PyObject *args, PyObject *kwds)
11275 { 11275 {
11276 PyObject *substring; 11276 PyObject *substring;
11277 Py_ssize_t start; 11277 Py_ssize_t start;
11278 Py_ssize_t end; 11278 Py_ssize_t end;
11279 Py_ssize_t result; 11279 Py_ssize_t result;
11280 11280
11281 if (!stringlib_parse_args_finds_unicode("find", args, &substring, 11281 if (!stringlib_parse_args_finds_unicode("find", args, kwds, &substring,
11282 &start, &end)) 11282 &start, &end))
11283 return NULL; 11283 return NULL;
11284 11284
11285 if (PyUnicode_READY(self) == -1) 11285 if (PyUnicode_READY(self) == -1)
11286 return NULL; 11286 return NULL;
11287 if (PyUnicode_READY(substring) == -1) 11287 if (PyUnicode_READY(substring) == -1)
11288 return NULL; 11288 return NULL;
11289 11289
11290 result = any_find_slice(1, self, substring, start, end); 11290 result = any_find_slice(1, self, substring, start, end);
11291 11291
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
11365 return x; 11365 return x;
11366 } 11366 }
11367 #undef HASH 11367 #undef HASH
11368 11368
11369 PyDoc_STRVAR(index__doc__, 11369 PyDoc_STRVAR(index__doc__,
11370 "S.index(sub[, start[, end]]) -> int\n\ 11370 "S.index(sub[, start[, end]]) -> int\n\
11371 \n\ 11371 \n\
11372 Like S.find() but raise ValueError when the substring is not found."); 11372 Like S.find() but raise ValueError when the substring is not found.");
11373 11373
11374 static PyObject * 11374 static PyObject *
11375 unicode_index(PyObject *self, PyObject *args) 11375 unicode_index(PyObject *self, PyObject *args, PyObject *kwds)
11376 { 11376 {
11377 Py_ssize_t result; 11377 Py_ssize_t result;
11378 PyObject *substring; 11378 PyObject *substring;
11379 Py_ssize_t start; 11379 Py_ssize_t start;
11380 Py_ssize_t end; 11380 Py_ssize_t end;
11381 11381
11382 if (!stringlib_parse_args_finds_unicode("index", args, &substring, 11382 if (!stringlib_parse_args_finds_unicode("index", args, kwds, &substring,
11383 &start, &end)) 11383 &start, &end))
11384 return NULL; 11384 return NULL;
11385 11385
11386 if (PyUnicode_READY(self) == -1) 11386 if (PyUnicode_READY(self) == -1)
11387 return NULL; 11387 return NULL;
11388 if (PyUnicode_READY(substring) == -1) 11388 if (PyUnicode_READY(substring) == -1)
11389 return NULL; 11389 return NULL;
11390 11390
11391 result = any_find_slice(1, self, substring, start, end); 11391 result = any_find_slice(1, self, substring, start, end);
11392 11392
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
12381 PyDoc_STRVAR(rfind__doc__, 12381 PyDoc_STRVAR(rfind__doc__,
12382 "S.rfind(sub[, start[, end]]) -> int\n\ 12382 "S.rfind(sub[, start[, end]]) -> int\n\
12383 \n\ 12383 \n\
12384 Return the highest index in S where substring sub is found,\n\ 12384 Return the highest index in S where substring sub is found,\n\
12385 such that sub is contained within S[start:end]. Optional\n\ 12385 such that sub is contained within S[start:end]. Optional\n\
12386 arguments start and end are interpreted as in slice notation.\n\ 12386 arguments start and end are interpreted as in slice notation.\n\
12387 \n\ 12387 \n\
12388 Return -1 on failure."); 12388 Return -1 on failure.");
12389 12389
12390 static PyObject * 12390 static PyObject *
12391 unicode_rfind(PyObject *self, PyObject *args) 12391 unicode_rfind(PyObject *self, PyObject *args, PyObject *kwds)
12392 { 12392 {
12393 PyObject *substring; 12393 PyObject *substring;
12394 Py_ssize_t start; 12394 Py_ssize_t start;
12395 Py_ssize_t end; 12395 Py_ssize_t end;
12396 Py_ssize_t result; 12396 Py_ssize_t result;
12397 12397
12398 if (!stringlib_parse_args_finds_unicode("rfind", args, &substring, 12398 if (!stringlib_parse_args_finds_unicode("rfind", args, kwds, &substring,
12399 &start, &end)) 12399 &start, &end))
12400 return NULL; 12400 return NULL;
12401 12401
12402 if (PyUnicode_READY(self) == -1) 12402 if (PyUnicode_READY(self) == -1)
12403 return NULL; 12403 return NULL;
12404 if (PyUnicode_READY(substring) == -1) 12404 if (PyUnicode_READY(substring) == -1)
12405 return NULL; 12405 return NULL;
12406 12406
12407 result = any_find_slice(-1, self, substring, start, end); 12407 result = any_find_slice(-1, self, substring, start, end);
12408 12408
12409 Py_DECREF(substring); 12409 Py_DECREF(substring);
12410 12410
12411 if (result == -2) 12411 if (result == -2)
12412 return NULL; 12412 return NULL;
12413 12413
12414 return PyLong_FromSsize_t(result); 12414 return PyLong_FromSsize_t(result);
12415 } 12415 }
12416 12416
12417 PyDoc_STRVAR(rindex__doc__, 12417 PyDoc_STRVAR(rindex__doc__,
12418 "S.rindex(sub[, start[, end]]) -> int\n\ 12418 "S.rindex(sub[, start[, end]]) -> int\n\
12419 \n\ 12419 \n\
12420 Like S.rfind() but raise ValueError when the substring is not found."); 12420 Like S.rfind() but raise ValueError when the substring is not found.");
12421 12421
12422 static PyObject * 12422 static PyObject *
12423 unicode_rindex(PyObject *self, PyObject *args) 12423 unicode_rindex(PyObject *self, PyObject *args, PyObject *kwds)
12424 { 12424 {
12425 PyObject *substring; 12425 PyObject *substring;
12426 Py_ssize_t start; 12426 Py_ssize_t start;
12427 Py_ssize_t end; 12427 Py_ssize_t end;
12428 Py_ssize_t result; 12428 Py_ssize_t result;
12429 12429
12430 if (!stringlib_parse_args_finds_unicode("rindex", args, &substring, 12430 if (!stringlib_parse_args_finds_unicode("rindex", args, kwds, &substring,
12431 &start, &end)) 12431 &start, &end))
12432 return NULL; 12432 return NULL;
12433 12433
12434 if (PyUnicode_READY(self) == -1) 12434 if (PyUnicode_READY(self) == -1)
12435 return NULL; 12435 return NULL;
12436 if (PyUnicode_READY(substring) == -1) 12436 if (PyUnicode_READY(substring) == -1)
12437 return NULL; 12437 return NULL;
12438 12438
12439 result = any_find_slice(-1, self, substring, start, end); 12439 result = any_find_slice(-1, self, substring, start, end);
12440 12440
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
12997 12997
12998 PyDoc_STRVAR(startswith__doc__, 12998 PyDoc_STRVAR(startswith__doc__,
12999 "S.startswith(prefix[, start[, end]]) -> bool\n\ 12999 "S.startswith(prefix[, start[, end]]) -> bool\n\
13000 \n\ 13000 \n\
13001 Return True if S starts with the specified prefix, False otherwise.\n\ 13001 Return True if S starts with the specified prefix, False otherwise.\n\
13002 With optional start, test S beginning at that position.\n\ 13002 With optional start, test S beginning at that position.\n\
13003 With optional end, stop comparing S at that position.\n\ 13003 With optional end, stop comparing S at that position.\n\
13004 prefix can also be a tuple of strings to try."); 13004 prefix can also be a tuple of strings to try.");
13005 13005
13006 static PyObject * 13006 static PyObject *
13007 unicode_startswith(PyObject *self, 13007 unicode_startswith(PyObject *self, PyObject *args, PyObject *kwds)
13008 PyObject *args)
13009 { 13008 {
13010 PyObject *subobj; 13009 PyObject *subobj;
13011 PyObject *substring; 13010 PyObject *substring;
13012 Py_ssize_t start = 0; 13011 Py_ssize_t start = 0;
13013 Py_ssize_t end = PY_SSIZE_T_MAX; 13012 Py_ssize_t end = PY_SSIZE_T_MAX;
13014 int result; 13013 int result;
13015 13014
13016 if (!stringlib_parse_args_finds("startswith", args, &subobj, &start, &end)) 13015 if (!stringlib_parse_args_finds("startswith", args, kwds, &subobj, &start,
13016 &end))
13017 return NULL; 13017 return NULL;
13018 if (PyTuple_Check(subobj)) { 13018 if (PyTuple_Check(subobj)) {
13019 Py_ssize_t i; 13019 Py_ssize_t i;
13020 for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) { 13020 for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
13021 substring = PyUnicode_FromObject(PyTuple_GET_ITEM(subobj, i)); 13021 substring = PyUnicode_FromObject(PyTuple_GET_ITEM(subobj, i));
13022 if (substring == NULL) 13022 if (substring == NULL)
13023 return NULL; 13023 return NULL;
13024 result = tailmatch(self, substring, start, end, -1); 13024 result = tailmatch(self, substring, start, end, -1);
13025 Py_DECREF(substring); 13025 Py_DECREF(substring);
13026 if (result) { 13026 if (result) {
(...skipping 18 matching lines...) Expand all
13045 13045
13046 PyDoc_STRVAR(endswith__doc__, 13046 PyDoc_STRVAR(endswith__doc__,
13047 "S.endswith(suffix[, start[, end]]) -> bool\n\ 13047 "S.endswith(suffix[, start[, end]]) -> bool\n\
13048 \n\ 13048 \n\
13049 Return True if S ends with the specified suffix, False otherwise.\n\ 13049 Return True if S ends with the specified suffix, False otherwise.\n\
13050 With optional start, test S beginning at that position.\n\ 13050 With optional start, test S beginning at that position.\n\
13051 With optional end, stop comparing S at that position.\n\ 13051 With optional end, stop comparing S at that position.\n\
13052 suffix can also be a tuple of strings to try."); 13052 suffix can also be a tuple of strings to try.");
13053 13053
13054 static PyObject * 13054 static PyObject *
13055 unicode_endswith(PyObject *self, 13055 unicode_endswith(PyObject *self, PyObject *args, PyObject *kwds)
13056 PyObject *args)
13057 { 13056 {
13058 PyObject *subobj; 13057 PyObject *subobj;
13059 PyObject *substring; 13058 PyObject *substring;
13060 Py_ssize_t start = 0; 13059 Py_ssize_t start = 0;
13061 Py_ssize_t end = PY_SSIZE_T_MAX; 13060 Py_ssize_t end = PY_SSIZE_T_MAX;
13062 int result; 13061 int result;
13063 13062
13064 if (!stringlib_parse_args_finds("endswith", args, &subobj, &start, &end)) 13063 if (!stringlib_parse_args_finds("endswith", args, kwds, &subobj, &start,
13064 &end))
13065 return NULL; 13065 return NULL;
13066 if (PyTuple_Check(subobj)) { 13066 if (PyTuple_Check(subobj)) {
13067 Py_ssize_t i; 13067 Py_ssize_t i;
13068 for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) { 13068 for (i = 0; i < PyTuple_GET_SIZE(subobj); i++) {
13069 substring = PyUnicode_FromObject( 13069 substring = PyUnicode_FromObject(
13070 PyTuple_GET_ITEM(subobj, i)); 13070 PyTuple_GET_ITEM(subobj, i));
13071 if (substring == NULL) 13071 if (substring == NULL)
13072 return NULL; 13072 return NULL;
13073 result = tailmatch(self, substring, start, end, +1); 13073 result = tailmatch(self, substring, start, end, +1);
13074 Py_DECREF(substring); 13074 Py_DECREF(substring);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
13171 13171
13172 {"encode", (PyCFunction) unicode_encode, METH_VARARGS | METH_KEYWORDS, encod e__doc__}, 13172 {"encode", (PyCFunction) unicode_encode, METH_VARARGS | METH_KEYWORDS, encod e__doc__},
13173 {"replace", (PyCFunction) unicode_replace, METH_VARARGS, replace__doc__}, 13173 {"replace", (PyCFunction) unicode_replace, METH_VARARGS, replace__doc__},
13174 {"split", (PyCFunction) unicode_split, METH_VARARGS | METH_KEYWORDS, split__ doc__}, 13174 {"split", (PyCFunction) unicode_split, METH_VARARGS | METH_KEYWORDS, split__ doc__},
13175 {"rsplit", (PyCFunction) unicode_rsplit, METH_VARARGS | METH_KEYWORDS, rspli t__doc__}, 13175 {"rsplit", (PyCFunction) unicode_rsplit, METH_VARARGS | METH_KEYWORDS, rspli t__doc__},
13176 {"join", (PyCFunction) unicode_join, METH_O, join__doc__}, 13176 {"join", (PyCFunction) unicode_join, METH_O, join__doc__},
13177 {"capitalize", (PyCFunction) unicode_capitalize, METH_NOARGS, capitalize__do c__}, 13177 {"capitalize", (PyCFunction) unicode_capitalize, METH_NOARGS, capitalize__do c__},
13178 {"casefold", (PyCFunction) unicode_casefold, METH_NOARGS, casefold__doc__}, 13178 {"casefold", (PyCFunction) unicode_casefold, METH_NOARGS, casefold__doc__},
13179 {"title", (PyCFunction) unicode_title, METH_NOARGS, title__doc__}, 13179 {"title", (PyCFunction) unicode_title, METH_NOARGS, title__doc__},
13180 {"center", (PyCFunction) unicode_center, METH_VARARGS, center__doc__}, 13180 {"center", (PyCFunction) unicode_center, METH_VARARGS, center__doc__},
13181 {"count", (PyCFunction) unicode_count, METH_VARARGS, count__doc__}, 13181 {"count", (PyCFunction) unicode_count, METH_VARARGS | METH_KEYWORDS, count__ doc__},
13182 {"expandtabs", (PyCFunction) unicode_expandtabs, METH_VARARGS, expandtabs__d oc__}, 13182 {"expandtabs", (PyCFunction) unicode_expandtabs, METH_VARARGS, expandtabs__d oc__},
13183 {"find", (PyCFunction) unicode_find, METH_VARARGS, find__doc__}, 13183 {"find", (PyCFunction) unicode_find, METH_VARARGS | METH_KEYWORDS, find__doc __},
13184 {"partition", (PyCFunction) unicode_partition, METH_O, partition__doc__}, 13184 {"partition", (PyCFunction) unicode_partition, METH_O, partition__doc__},
13185 {"index", (PyCFunction) unicode_index, METH_VARARGS, index__doc__}, 13185 {"index", (PyCFunction) unicode_index, METH_VARARGS | METH_KEYWORDS, index__ doc__},
13186 {"ljust", (PyCFunction) unicode_ljust, METH_VARARGS, ljust__doc__}, 13186 {"ljust", (PyCFunction) unicode_ljust, METH_VARARGS, ljust__doc__},
13187 {"lower", (PyCFunction) unicode_lower, METH_NOARGS, lower__doc__}, 13187 {"lower", (PyCFunction) unicode_lower, METH_NOARGS, lower__doc__},
13188 {"lstrip", (PyCFunction) unicode_lstrip, METH_VARARGS, lstrip__doc__}, 13188 {"lstrip", (PyCFunction) unicode_lstrip, METH_VARARGS, lstrip__doc__},
13189 {"rfind", (PyCFunction) unicode_rfind, METH_VARARGS, rfind__doc__}, 13189 {"rfind", (PyCFunction) unicode_rfind, METH_VARARGS | METH_KEYWORDS, rfind__ doc__},
13190 {"rindex", (PyCFunction) unicode_rindex, METH_VARARGS, rindex__doc__}, 13190 {"rindex", (PyCFunction) unicode_rindex, METH_VARARGS | METH_KEYWORDS, rinde x__doc__},
13191 {"rjust", (PyCFunction) unicode_rjust, METH_VARARGS, rjust__doc__}, 13191 {"rjust", (PyCFunction) unicode_rjust, METH_VARARGS, rjust__doc__},
13192 {"rstrip", (PyCFunction) unicode_rstrip, METH_VARARGS, rstrip__doc__}, 13192 {"rstrip", (PyCFunction) unicode_rstrip, METH_VARARGS, rstrip__doc__},
13193 {"rpartition", (PyCFunction) unicode_rpartition, METH_O, rpartition__doc__}, 13193 {"rpartition", (PyCFunction) unicode_rpartition, METH_O, rpartition__doc__},
13194 {"splitlines", (PyCFunction) unicode_splitlines, METH_VARARGS | METH_KEYWORD S, splitlines__doc__}, 13194 {"splitlines", (PyCFunction) unicode_splitlines, METH_VARARGS | METH_KEYWORD S, splitlines__doc__},
13195 {"strip", (PyCFunction) unicode_strip, METH_VARARGS, strip__doc__}, 13195 {"strip", (PyCFunction) unicode_strip, METH_VARARGS, strip__doc__},
13196 {"swapcase", (PyCFunction) unicode_swapcase, METH_NOARGS, swapcase__doc__}, 13196 {"swapcase", (PyCFunction) unicode_swapcase, METH_NOARGS, swapcase__doc__},
13197 {"translate", (PyCFunction) unicode_translate, METH_O, translate__doc__}, 13197 {"translate", (PyCFunction) unicode_translate, METH_O, translate__doc__},
13198 {"upper", (PyCFunction) unicode_upper, METH_NOARGS, upper__doc__}, 13198 {"upper", (PyCFunction) unicode_upper, METH_NOARGS, upper__doc__},
13199 {"startswith", (PyCFunction) unicode_startswith, METH_VARARGS, startswith__d oc__}, 13199 {"startswith", (PyCFunction) unicode_startswith, METH_VARARGS | METH_KEYWORD S, startswith__doc__},
13200 {"endswith", (PyCFunction) unicode_endswith, METH_VARARGS, endswith__doc__}, 13200 {"endswith", (PyCFunction) unicode_endswith, METH_VARARGS | METH_KEYWORDS, e ndswith__doc__},
13201 {"islower", (PyCFunction) unicode_islower, METH_NOARGS, islower__doc__}, 13201 {"islower", (PyCFunction) unicode_islower, METH_NOARGS, islower__doc__},
13202 {"isupper", (PyCFunction) unicode_isupper, METH_NOARGS, isupper__doc__}, 13202 {"isupper", (PyCFunction) unicode_isupper, METH_NOARGS, isupper__doc__},
13203 {"istitle", (PyCFunction) unicode_istitle, METH_NOARGS, istitle__doc__}, 13203 {"istitle", (PyCFunction) unicode_istitle, METH_NOARGS, istitle__doc__},
13204 {"isspace", (PyCFunction) unicode_isspace, METH_NOARGS, isspace__doc__}, 13204 {"isspace", (PyCFunction) unicode_isspace, METH_NOARGS, isspace__doc__},
13205 {"isdecimal", (PyCFunction) unicode_isdecimal, METH_NOARGS, isdecimal__doc__ }, 13205 {"isdecimal", (PyCFunction) unicode_isdecimal, METH_NOARGS, isdecimal__doc__ },
13206 {"isdigit", (PyCFunction) unicode_isdigit, METH_NOARGS, isdigit__doc__}, 13206 {"isdigit", (PyCFunction) unicode_isdigit, METH_NOARGS, isdigit__doc__},
13207 {"isnumeric", (PyCFunction) unicode_isnumeric, METH_NOARGS, isnumeric__doc__ }, 13207 {"isnumeric", (PyCFunction) unicode_isnumeric, METH_NOARGS, isnumeric__doc__ },
13208 {"isalpha", (PyCFunction) unicode_isalpha, METH_NOARGS, isalpha__doc__}, 13208 {"isalpha", (PyCFunction) unicode_isalpha, METH_NOARGS, isalpha__doc__},
13209 {"isalnum", (PyCFunction) unicode_isalnum, METH_NOARGS, isalnum__doc__}, 13209 {"isalnum", (PyCFunction) unicode_isalnum, METH_NOARGS, isalnum__doc__},
13210 {"isidentifier", (PyCFunction) unicode_isidentifier, METH_NOARGS, isidentifi er__doc__}, 13210 {"isidentifier", (PyCFunction) unicode_isidentifier, METH_NOARGS, isidentifi er__doc__},
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
14584 PyMODINIT_FUNC 14584 PyMODINIT_FUNC
14585 PyInit__string(void) 14585 PyInit__string(void)
14586 { 14586 {
14587 return PyModule_Create(&_string_module); 14587 return PyModule_Create(&_string_module);
14588 } 14588 }
14589 14589
14590 14590
14591 #ifdef __cplusplus 14591 #ifdef __cplusplus
14592 } 14592 }
14593 #endif 14593 #endif
OLDNEW
« no previous file with comments | « Objects/stringlib/find.h ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+