diff Python/bltinmodule.c @ 11882:dc65c5f6ad7c legacy-trunk

Massive patch by Skip Montanaro to add ":name" to as many PyArg_ParseTuple() format string arguments as possible.
author Guido van Rossum <guido@python.org>
date Tue, 29 Feb 2000 13:59:29 +0000
parents 449b074c3051
children 8bdc25d22925
line wrap: on
line diff
--- a/Python/bltinmodule.c	Tue Feb 29 13:31:16 2000 +0000
+++ b/Python/bltinmodule.c	Tue Feb 29 13:59:29 2000 +0000
@@ -846,7 +846,7 @@
 {
 	PyObject *d;
 
-	if (!PyArg_ParseTuple(args, ""))
+	if (!PyArg_ParseTuple(args, ":globals"))
 		return NULL;
 	d = PyEval_GetGlobals();
 	Py_INCREF(d);
@@ -1212,7 +1212,7 @@
 	PyObject *args;
 {
 	PyObject *s;
-	if (!PyArg_ParseTuple(args, "S", &s))
+	if (!PyArg_ParseTuple(args, "S:intern", &s))
 		return NULL;
 	Py_INCREF(s);
 	PyString_InternInPlace(&s);
@@ -1383,7 +1383,7 @@
 {
 	PyObject *d;
 
-	if (!PyArg_ParseTuple(args, ""))
+	if (!PyArg_ParseTuple(args, ":locals"))
 		return NULL;
 	d = PyEval_GetLocals();
 	Py_INCREF(d);
@@ -2091,7 +2091,7 @@
 	static PyObject *__class__ = NULL;
 	int retval = 0;
 
-	if (!PyArg_ParseTuple(args, "OO", &inst, &cls))
+	if (!PyArg_ParseTuple(args, "OO:isinstance", &inst, &cls))
 		return NULL;
 
         if (PyClass_Check(cls)) {
@@ -2150,7 +2150,7 @@
 	PyObject *cls;
 	int retval;
 
-	if (!PyArg_ParseTuple(args, "OO", &derived, &cls))
+	if (!PyArg_ParseTuple(args, "OO:issubclass", &derived, &cls))
 		return NULL;
 
 	if (!PyClass_Check(derived) || !PyClass_Check(cls)) {