From e2ec0b27c02a158d0007c11dcc1f2d7a95948712 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 9 Oct 2020 14:14:37 +0300 Subject: bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593) Remove complex special methods __int__, __float__, __floordiv__, __mod__, __divmod__, __rfloordiv__, __rmod__ and __rdivmod__ which always raised a TypeError. --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/bytesobject.c') diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 836a736037..990730cd8c 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -522,7 +522,7 @@ formatlong(PyObject *v, int flags, int prec, int type) PyErr_Format(PyExc_TypeError, "%%%c format: %s is required, not %.200s", type, (type == 'o' || type == 'x' || type == 'X') ? "an integer" - : "a number", + : "a real number", Py_TYPE(v)->tp_name); return NULL; } -- cgit v1.2.1