commit | a49ac9902903a798fab4970ccf563c531199c3f8 | [log] [tgz] |
---|---|---|
author | INADA Naoki <methane@users.noreply.github.com> | Sat Jan 27 14:06:21 2018 +0900 |
committer | GitHub <noreply@github.com> | Sat Jan 27 14:06:21 2018 +0900 |
tree | 56390f8d6849446b23d3d2a152c6197fc724ae70 | |
parent | 85527cf50a9a4eecaca4022f7c6cb9e0bae1fa5f [diff] [blame] |
bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)
diff --git a/Objects/stringlib/ctype.h b/Objects/stringlib/ctype.h index f054625..fd7b1bd 100644 --- a/Objects/stringlib/ctype.h +++ b/Objects/stringlib/ctype.h
@@ -23,6 +23,12 @@ } static PyObject* +stringlib_isascii(PyObject *self) +{ + return _Py_bytes_isascii(STRINGLIB_STR(self), STRINGLIB_LEN(self)); +} + +static PyObject* stringlib_isdigit(PyObject *self) { return _Py_bytes_isdigit(STRINGLIB_STR(self), STRINGLIB_LEN(self));