summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index eb18611..8449fc7 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -930,6 +930,13 @@ rangeiter_new(PyTypeObject *type, PyObject *args, PyObject *kw)
{
long start, stop, step;
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "range_iterator(): creating instances of range_iterator "
+ "by calling range_iterator type is deprecated",
+ 1)) {
+ return NULL;
+ }
+
if (!_PyArg_NoKeywords("range_iterator()", kw)) {
return NULL;
}