From c18a6f466a3caaee835540014768f7d38206053a Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Tue, 9 May 2000 14:27:48 +0000
Subject: [PATCH] Replace PyErr_BadArgument() error in PyInt_AsLong() with "an
 integer is required" (we can't say more because we don't know in which
 context it is called).

---
 Objects/intobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Objects/intobject.c b/Objects/intobject.c
index 79435a990a..2e8939e65e 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -198,7 +198,7 @@ PyInt_AsLong(op)
 	
 	if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL ||
 	    nb->nb_int == NULL) {
-		PyErr_BadArgument();
+		PyErr_SetString(PyExc_TypeError, "an integer is required");
 		return -1;
 	}
 	
-- 
2.40.0