Author josh.r
Recipients BTaskaya, Mark.Shannon, christian.heimes, josh.r, mark.dickinson, pablogsal, rhettinger, serhiy.storchaka
Date 2020-11-25.05:04:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606280674.8.0.918415272761.issue42454@roundup.psfhosted.org>
In-reply-to
Content
There is an open issue for this already, under #11107 (a reopen of the closed #2268, where the reopen was justified due to Python 3 making slice objects more common), just so you know.

I made a stab at this a while ago and gave up due to the problems with making slices constants while trying to keep them unhashable (and I never got to handling the marshal format updates properly). It doesn't seem right to incidentally make:

    something[::-1] = something

actually work, and be completely nonsensical, when "something" happens to be a dict, when previously, you'd get a clear TypeError for trying to do it. I could definitely see code using duck-typing via slices to distinguish sequences from other iterables and mappings, and making mapping suddenly support slices in a nonsensical way is... odd.
History
Date User Action Args
2020-11-25 05:04:34josh.rsetrecipients: + josh.r, rhettinger, mark.dickinson, christian.heimes, Mark.Shannon, serhiy.storchaka, pablogsal, BTaskaya
2020-11-25 05:04:34josh.rsetmessageid: <1606280674.8.0.918415272761.issue42454@roundup.psfhosted.org>
2020-11-25 05:04:34josh.rlinkissue42454 messages
2020-11-25 05:04:33josh.rcreate