Message347852
-1 on the proposal. We don't know of any strong use cases, so there isn't a real problem being solved here. Rather than providing a benefit, this feature request makes it more likely that people will write convoluted code or that it will let bugs pass silently that would otherwise be caught.
ISTM the actual issue here is an incorrect user expectation that "all things that having indexing will support negative indexing". While it is common for objects to implement negative index support, it is not universal or required. Even collections.abc.Sequence does not insist on negative index support.
I think this warrants a FAQ entry (which should also mention that slice support as well is not universal or required, some objects have it, some don't).
Reclassifying this as documentation issue. |
|
Date |
User |
Action |
Args |
2019-07-13 18:37:32 | rhettinger | set | recipients:
+ rhettinger, tlynn, timehorse, ezio.melotti, mrabarnett, docs@python, serhiy.storchaka |
2019-07-13 18:37:32 | rhettinger | set | messageid: <1563043052.67.0.337933741369.issue7940@roundup.psfhosted.org> |
2019-07-13 18:37:32 | rhettinger | link | issue7940 messages |
2019-07-13 18:37:32 | rhettinger | create | |
|