New submission from Nick Coghlan <ncogh...@gmail.com>: Enhancement to range to correctly handle indexing and slicing when len(x) raises OverflowError.
Note that this enables correct calculation of the length of such ranges via: def _range_len(x): try: length = len(x) except OverflowError: step = x[1] - x[0] length = 1 + ((x[-1] - x[0]) // step) return length ---------- assignee: ncoghlan messages: 126017 nosy: ncoghlan priority: normal severity: normal status: open title: Fix range slicing and indexing to handle lengths > sys.maxsize _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10889> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com