mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
Apply patch diff.txt from SF feature request
http://www.python.org/sf/444708 This adds the optional argument for str.strip to unicode.strip too and makes it possible to call str.strip with a unicode argument and unicode.strip with a str argument.
This commit is contained in:
parent
a7cc43b9e8
commit
de02bcb265
6 changed files with 243 additions and 80 deletions
|
@ -1040,6 +1040,13 @@ extern DL_IMPORT(int) PyUnicode_Contains(
|
|||
PyObject *element /* Element string */
|
||||
);
|
||||
|
||||
/* Externally visible for str.strip(unicode) */
|
||||
extern DL_IMPORT(PyObject *) _PyUnicode_XStrip(
|
||||
PyUnicodeObject *self,
|
||||
int striptype,
|
||||
PyObject *sepobj
|
||||
);
|
||||
|
||||
/* === Characters Type APIs =============================================== */
|
||||
|
||||
/* These should not be used directly. Use the Py_UNICODE_IS* and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue