Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46920: Remove disabled debug code added decades ago and likely unnecessary #31812

Merged
merged 1 commit into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -13621,14 +13621,6 @@ unicode_zfill_impl(PyObject *self, Py_ssize_t width)
return u;
}

#if 0
static PyObject *
unicode__decimal2ascii(PyObject *self)
{
return PyUnicode_TransformDecimalAndSpaceToASCII(self);
}
#endif

PyDoc_STRVAR(startswith__doc__,
"S.startswith(prefix[, start[, end]]) -> bool\n\
\n\
Expand Down Expand Up @@ -14214,11 +14206,6 @@ static PyMethodDef unicode_methods[] = {
UNICODE___FORMAT___METHODDEF
UNICODE_MAKETRANS_METHODDEF
UNICODE_SIZEOF_METHODDEF
#if 0
/* These methods are just used for debugging the implementation. */
{"_decimal2ascii", (PyCFunction) unicode__decimal2ascii, METH_NOARGS},
#endif

{"__getnewargs__", unicode_getnewargs, METH_NOARGS},
{NULL, NULL}
};
Expand Down
11 changes: 0 additions & 11 deletions Parser/pegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ _PyPegen_byte_offset_to_character_offset(PyObject *line, Py_ssize_t col_offset)
return size;
}

#if 0
static const char *
token_name(int type)
{
if (0 <= type && type <= N_TOKENS) {
return _PyParser_TokenNames[type];
}
return "<Huh?>";
}
#endif

// Here, mark is the start of the node, while p->mark is the end.
// If node==NULL, they should be the same.
int
Expand Down
18 changes: 0 additions & 18 deletions Python/formatter_unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,24 +137,6 @@ typedef struct {
Py_UCS4 type;
} InternalFormatSpec;

#if 0
/* Occasionally useful for debugging. Should normally be commented out. */
static void
DEBUG_PRINT_FORMAT_SPEC(InternalFormatSpec *format)
{
printf("internal format spec: fill_char %d\n", format->fill_char);
printf("internal format spec: align %d\n", format->align);
printf("internal format spec: alternate %d\n", format->alternate);
printf("internal format spec: sign %d\n", format->sign);
printf("internal format spec: width %zd\n", format->width);
printf("internal format spec: thousands_separators %d\n",
format->thousands_separators);
printf("internal format spec: precision %zd\n", format->precision);
printf("internal format spec: type %c\n", format->type);
printf("\n");
}
#endif


/*
ptr points to the start of the format_spec, end points just past its end.
Expand Down