mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
Issue #28376: Creating instances of range_iterator by calling range_iterator
type now is deprecated. Patch by Oren Milman.
This commit is contained in:
parent
639098c591
commit
c7f490c8b1
3 changed files with 33 additions and 20 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue