Alok Singhal added the comment:

This updated patch has support for starting in fast mode until the next count 
would result in overflow in Py_ssize_t.  The first patch started in slow mode 
as soon as any of 'start', 'stop', or 'step' was outside of the range.  With 
this patch, we start in fast mode if possible and then transition to slow mode 
when needed.

I also tested this patch for correctness for the following cases:

- starting in slow mode,
- transition from fast -> slow,
- pickle/unpickle

I did this by temporarily changing the code twice:

- to always use fast mode, and
- pretending that overflow occurs at value 5 instead of PY_SSIZE_T_MAX.

----------
Added file: http://bugs.python.org/file34996/islice_large_values-2.patch

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

Reply via email to