Ronald Oussoren added the comment:

Is it necessary to raise when it_index is PY_SSIZE_T_MAX? 

An alternative is to set it_index to -1 when there would be overflow and raise 
an exception on the next call to next(). That way a virtual sequence with 
PY_SSIZE_T_MAX-1 items would still work (instead of failing unexpectedly).

----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22939>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to