Ticket #15682

rindexのところの説明が間違っています。
Eröffnet am: 2009-03-22 16:23 Letztes Update: 2009-04-02 11:46

Auswertung:
(Anonym)
Verantwortlicher:
(Keine)
Typ:
Status:
Geschlossen
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Accepted
Datei:
Keine

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-Verlauf (1/1 Historien)

2009-04-02 11:46 Aktualisiert von: omoikane
  • Lösung Update from Keine to Accepted
  • Status Update from Offen to Geschlossen
  • Ticket Close date is changed to 2009-04-02 11:46
Kommentar

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

Dateianhangliste

Keine Anhänge

Bearbeiten

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