Tíquete #15682

rindexのところの説明が間違っています。
: 2009-03-22 16:23 Última Atualização: 2009-04-02 11:46

Relator:
(Anônimo)
Dono:
(Nenhum)
Tipo:
Estado:
Fechado
Componente:
(Nenhum)
Marcos:
(Nenhum)
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Accepted
Arquivo:
Nenhum

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
  • Resolução Update from Nenhum to Accepted
  • Estado Update from Aberto to Fechado
  • Ticket Close date is changed to 2009-04-02 11:46
Comentário

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

Attachment File List

No attachments

Editar

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