summaryrefslogtreecommitdiff
path: root/Objects/longobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 0bf6cee6c1..6c47602077 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -4811,6 +4811,12 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
return PyLong_FromLong(0L);
}
+ if (PyTuple_GET_SIZE(args) == 0) {
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "Using 'x' as a keyword argument is deprecated; "
+ "specify the value as a positional argument instead") < 0)
+ return NULL;
+ }
if (obase == NULL)
return PyNumber_Long(x);