[issue28587] list.index documentation missing start and stop arguments

2017-02-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I backported these changes to 3.5 branch. Please let me know if this is ok. Thanks. -- versions: +Python 3.5 ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2017-02-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +266 ___ Python tracker ___ ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, applied. -- status: open -> closed ___ Python tracker ___ ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset efac7ac53933 by Raymond Hettinger in branch '3.6': Issue #28587: Improve list examples in the tutorial https://hg.python.org/cpython/rev/efac7ac53933 -- ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks Raymond. The new set of examples is much better than the previous one. +1 -- ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching an improved list example: * Replaced abstract and hard to follow numerical example with fruits * Demonstrate the non-mutating methods first -- Added file: http://bugs.python.org/file45595/new_list_example.diff

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for noticing. I tested against the original list rather than the subsequently modified version. I'm starting to think that this whole example section is annoyingly hard to follow and uninformative. --

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Raymond and Martin :) Not sure what the procedure is for fixing this. Do I upload another patch? -- ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Martin Panter
Martin Panter added the comment: The committed change looks wrong in the new example. I think Mariatta’s patch was right; it the index found is 3, not 2: >>> a [66.25, 333, -1, 333, 1, 1234.5, 333] >>> a.index(333) 1 >>> a.index(333, 2) # search for 333 starting at index 2 3 -- nosy:

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mariatta, thank you for the patch. And Chris, thanks for the observant bug report. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62c16fafa7d4 by Raymond Hettinger in branch '3.6': Issue 28587: list.index documentation missing start and stop arguments. (Contributed by Mariatta Wijaya.) https://hg.python.org/cpython/rev/62c16fafa7d4 -- nosy: +python-dev

[issue28587] list.index documentation missing start and stop arguments

2016-11-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback, Raymond :) I rephrased the docs like the following, what do you think? Return zero-based index in the list of the first item whose value is *x*. It is an error if there is no such item. Optional arguments ``start`` and ``end`` are

[issue28587] list.index documentation missing start and stop arguments

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: This patch looks very good and I especially like the example. One nit. It may be insufficient to say that the start/end arguments are interpreted the same as the slice notation. While that clear indicates the range being searched, it is silent on whether

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Here is an updated patch. Please review :) Thanks. -- Added file: http://bugs.python.org/file45376/issue28587v3.patch ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback :) Makes sense, I'll work on another patch. -- ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: The patch looks fine, though I suggest clarifying the example for a.index(333, 2) by adding a comment such as '# begin searching at index 2' to explain what's going on. -- nosy: +akuchling ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hmm, I did not mean to replace the documentation example like that. Here's another update. -- Added file: http://bugs.python.org/file45314/issue28587.patch ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Attached is the patch to update the documentation. Please review. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45313/issue28587.patch ___ Python tracker

[issue28587] list.index documentation missing start and stop arguments

2016-11-02 Thread ChrisRands
New submission from ChrisRands: In Python 3 and 2 docs https://docs.python.org/3.5/tutorial/datastructures.html, list.index only mentions the first argument: list.index(x) Return the index in the list of the first item whose value is x. It is an error if there is no such item.