Author terry.reedy
Recipients mark.dickinson, serhiy.storchaka, tehybel, terry.reedy
Date 2016-08-26.19:21:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1472239264.87.0.889588596218.issue27867@psf.upfronthosting.co.za>
In-reply-to
Content
I presume you are suggesting to raise if the length changes.  This is similar to raising when a dict is mutated while iterating.  Note that we do not do this with mutable sequences.  (If the iteration is stopped with out-of-memory error, so be it.)

An alternate approach would be to first fully evaluate start, stop, step , *and then length*, to ints, in that order, before using any of them.  In particular, have everything stable before comparing and adjusting start and stop to length.  This way, slices would continue to always work, barring other exceptions in __index__ or __length__.
History
Date User Action Args
2016-08-26 19:21:04terry.reedysetrecipients: + terry.reedy, mark.dickinson, serhiy.storchaka, tehybel
2016-08-26 19:21:04terry.reedysetmessageid: <1472239264.87.0.889588596218.issue27867@psf.upfronthosting.co.za>
2016-08-26 19:21:04terry.reedylinkissue27867 messages
2016-08-26 19:21:04terry.reedycreate