Message381765
I'm slightly concerned about hashability of slice objects. Currently the slice constructor does not ensure that any slice parameter is a number. You can do horrible stuff like this:
>>> slice({})
slice(None, {}, None)
which of course fails later on:
>>> [][slice({})]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: slice indices must be integers or None or have an __index__ method
Would it be possible to move type checks to slice constructor? |
|
Date |
User |
Action |
Args |
2020-11-24 18:07:50 | christian.heimes | set | recipients:
+ christian.heimes, rhettinger, mark.dickinson, Mark.Shannon, serhiy.storchaka, pablogsal, BTaskaya |
2020-11-24 18:07:50 | christian.heimes | set | messageid: <1606241270.35.0.234482115511.issue42454@roundup.psfhosted.org> |
2020-11-24 18:07:50 | christian.heimes | link | issue42454 messages |
2020-11-24 18:07:50 | christian.heimes | create | |
|