Message391029
The range builtin type is a collections.abc.Sequence, which in Python 3.5 added the optional start and stop arguments to the index method of Sequences. However, range.index does not support these optional arguments required by Sequence.
I noticed this when creating a wrapper type around range which was a Sequence. mypy complained 'Signature of "index" incompatible with supertype "Sequence"', but attempting to pass the values raised 'TypeError: index() takes exactly one argument (3 given)'. |
|
Date |
User |
Action |
Args |
2021-04-14 04:11:46 | ktbarrett | set | recipients:
+ ktbarrett |
2021-04-14 04:11:46 | ktbarrett | set | messageid: <1618373506.04.0.457958304296.issue43836@roundup.psfhosted.org> |
2021-04-14 04:11:45 | ktbarrett | link | issue43836 messages |
2021-04-14 04:11:45 | ktbarrett | create | |
|