Ticket #15682

rindexのところの説明が間違っています。
오픈 날짜: 2009-03-22 16:23 마지막 업데이트: 2009-04-02 11:46

Reporter:
(Anonymous)
소유자:
(None)
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Accepted
File:
None

Details

http://www.python.jp/doc/release/lib/string-methods.html

のrindexのところが

rindex( sub[, start[, end]])
find() と同様ですが、sub が見つからなかった場合 ValueError を送出します。

となっていますが、

>>> "akira".rindex("a")
4
>>> "akira".find("a")
0

実行してみたところ違います。

>>> "akira".rfind("a")
4

なので、findではなくてrfindの間違いだと思います。

Ticket History (1/1 Histories)

2009-04-02 11:46 Updated by: omoikane
  • Resolution Update from None to Accepted
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2009-04-02 11:46
댓글 올리기

2.4 の cvs, 2.5 の svn 上で修正しました。次回リリース時に反映されます。

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login