Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2550c7

Browse files
committed
Remove chr8, we're not likely to need it at this point
1 parent 7cec252 commit c2550c7

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

Python/bltinmodule.c

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -338,30 +338,6 @@ PyDoc_STRVAR(format_doc,
338338
Returns value.__format__(format_spec)\n\
339339
format_spec defaults to \"\"");
340340

341-
342-
static PyObject *
343-
builtin_chr8(PyObject *self, PyObject *args)
344-
{
345-
long x;
346-
char s[1];
347-
348-
if (!PyArg_ParseTuple(args, "l:chr8", &x))
349-
return NULL;
350-
if (x < 0 || x >= 256) {
351-
PyErr_SetString(PyExc_ValueError,
352-
"chr8() arg not in range(256)");
353-
return NULL;
354-
}
355-
s[0] = (char)x;
356-
return PyString_FromStringAndSize(s, 1);
357-
}
358-
359-
PyDoc_STRVAR(chr8_doc,
360-
"chr8(i) -> 8-bit character\n\
361-
\n\
362-
Return a string of one character with ordinal i; 0 <= i < 256.");
363-
364-
365341
static PyObject *
366342
builtin_chr(PyObject *self, PyObject *args)
367343
{
@@ -1715,8 +1691,7 @@ static PyMethodDef builtin_methods[] = {
17151691
{"all", builtin_all, METH_O, all_doc},
17161692
{"any", builtin_any, METH_O, any_doc},
17171693
{"bin", builtin_bin, METH_O, bin_doc},
1718-
{"chr", builtin_chr, METH_VARARGS, chr_doc},
1719-
{"chr8", builtin_chr8, METH_VARARGS, chr8_doc},
1694+
{"chr", builtin_chr, METH_VARARGS, chr_doc},
17201695
{"cmp", builtin_cmp, METH_VARARGS, cmp_doc},
17211696
{"compile", (PyCFunction)builtin_compile, METH_VARARGS | METH_KEYWORDS, compile_doc},
17221697
{"delattr", builtin_delattr, METH_VARARGS, delattr_doc},

0 commit comments

Comments
 (0)