Message326701
Unfortunately, it looks like there's no requirement for an abc.Sequence to implement the 3 argument form of seq.index, so I suppose this is technically just a documentation bug...
>>> range(5).index(2, 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: index() takes exactly one argument (2 given)
>>> help(range.index)
Help on method_descriptor:
index(...)
rangeobject.index(value, [start, [stop]]) -> integer -- return index of value.
Raise ValueError if the value is not present. |
|
Date |
User |
Action |
Args |
2018-09-30 03:55:38 | bup | set | recipients:
+ bup, larry, docs@python |
2018-09-30 03:55:38 | bup | set | messageid: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> |
2018-09-30 03:55:38 | bup | link | issue34848 messages |
2018-09-30 03:55:37 | bup | create | |
|