Message381791
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. |
|
Date |
User |
Action |
Args |
2020-11-25 05:04:34 | josh.r | set | recipients:
+ josh.r, rhettinger, mark.dickinson, christian.heimes, Mark.Shannon, serhiy.storchaka, pablogsal, BTaskaya |
2020-11-25 05:04:34 | josh.r | set | messageid: <1606280674.8.0.918415272761.issue42454@roundup.psfhosted.org> |
2020-11-25 05:04:34 | josh.r | link | issue42454 messages |
2020-11-25 05:04:33 | josh.r | create | |
|