Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 46578:7670005da8c5 legacy-trunk
A little reformating of Py3k warnings
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sun, 27 Apr 2008 18:40:21 +0000 |
| parents | aef3501d8e77 |
| children | 7a6d7474ce6e |
line wrap: on
line diff
--- a/Python/bltinmodule.c Sun Apr 27 18:14:39 2008 +0000 +++ b/Python/bltinmodule.c Sun Apr 27 18:40:21 2008 +0000 @@ -166,7 +166,7 @@ PyObject *t = NULL, *retval = NULL; if (PyErr_WarnPy3k("apply() not supported in 3.x; " - "use func(*args, **kwargs)", 1) < 0) + "use func(*args, **kwargs)", 1) < 0) return NULL; if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict)) @@ -224,7 +224,7 @@ builtin_callable(PyObject *self, PyObject *v) { if (PyErr_WarnPy3k("callable() not supported in 3.x; " - "use hasattr(o, '__call__')", 1) < 0) + "use hasattr(o, '__call__')", 1) < 0) return NULL; return PyBool_FromLong((long)PyCallable_Check(v)); } @@ -704,7 +704,7 @@ int exists; if (PyErr_WarnPy3k("execfile() not supported in 3.x; use exec()", - 1) < 0) + 1) < 0) return NULL; if (!PyArg_ParseTuple(args, "s|O!O:execfile", @@ -931,7 +931,7 @@ if (func == Py_None) { if (PyErr_WarnPy3k("map(None, ...) not supported in 3.x; " - "use list(...)", 1) < 0) + "use list(...)", 1) < 0) return NULL; if (n == 1) { /* map(None, S) is the same as list(S). */ @@ -1959,7 +1959,7 @@ PyObject *seq, *func, *result = NULL, *it; if (PyErr_WarnPy3k("reduce() not supported in 3.x; " - "use functools.reduce()", 1) < 0) + "use functools.reduce()", 1) < 0) return NULL; if (!PyArg_UnpackTuple(args, "reduce", 2, 3, &func, &seq, &result)) @@ -2035,7 +2035,7 @@ builtin_reload(PyObject *self, PyObject *v) { if (PyErr_WarnPy3k("In 3.x, reload() is renamed to imp.reload()", - 1) < 0) + 1) < 0) return NULL; return PyImport_ReloadModule(v);
