[issue36639] Provide list.rindex()

2019-04-24 Thread 林自均
林自均 added the comment: Hi @SilentGhost, Yes, sorry I didn't make it clear. I was just posting the discussion here for some reference, not claiming that this issue should be reopened. -- ___ Python tracker _

[issue36639] Provide list.rindex()

2019-04-24 Thread SilentGhost
SilentGhost added the comment: > I guess that's strong enough. As a str.rindex use case. I don't read it as Guido's endorsing list.rindex proposal, johnlinp. -- ___ Python tracker _

[issue36639] Provide list.rindex()

2019-04-23 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue36639] Provide list.rindex()

2019-04-23 Thread 林自均
林自均 added the comment: >From the discussion in >https://mail.python.org/pipermail/python-ideas/2019-April/056416.html, Guido >said: > Some use cases for rindex() on strings that I found in a large codebase here include searching a pathname for the final slash, a list of comma-separated items

[issue36639] Provide list.rindex()

2019-04-17 Thread 林自均
林自均 added the comment: Hi @rhettinger , Thank you for the reply. May I ask what is the known, strong use cases for str.rindex()? -- ___ Python tracker ___ ___

[issue36639] Provide list.rindex()

2019-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: There were known, strong use cases for str.rindex(). The list.rindex() method was intentionally omitted. AFAICT no compelling use cases have arisen, so we should continue to leave it out. In general, we don't grow the core APIs unnecessarily. Thank yo

[issue36639] Provide list.rindex()

2019-04-16 Thread 林自均
林自均 added the comment: Hi @SilentGhost, Thank you for the feedback. The PR is only a WIP and a placeholder. Hi @xtreak, Thank you for searching that mailing list for me. However, after reading the thread, it seems that we didn't have any conclusion on whether we should add list.rindex() or n

[issue36639] Provide list.rindex()

2019-04-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New methods to builtins generally require a python-ideas discussion. Search brings up an old discussion for rindex and rremove : https://mail.python.org/pipermail/python-ideas/2009-May/004506.html . It also would make users ask for tuple.rindex as

[issue36639] Provide list.rindex()

2019-04-16 Thread SilentGhost
SilentGhost added the comment: That's a fairly bare-bones implementation you're providing in your PR. Such a feature would need documentation, tests, news entry. I'm not endorsing or discarding your idea, but these are the general requirements for the feature of this level. -- compo

[issue36639] Provide list.rindex()

2019-04-15 Thread 林自均
Change by 林自均 : -- keywords: +patch pull_requests: +12776 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36639] Provide list.rindex()

2019-04-15 Thread 林自均
New submission from 林自均 : There are str.index() and str.rindex(), but there is only list.index() and no list.rindex(). It will be very handy if we provide it. -- components: Library (Lib) messages: 340312 nosy: johnlinp priority: normal severity: normal status: open title: Provide list.