Re: Two python issues (Posting On Python-List Prohibited)

Liste des GroupesRevenir à cl python 
Sujet : Re: Two python issues (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.python
Date : 05. Nov 2024, 22:56:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vge49g$1nfmk$4@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.160 (Toresk; )
On Tue, 5 Nov 2024 22:27:53 +0100, Piergiorgio Sartor wrote:

To write the nested expression, s[s.find(...)] it means you're 200% sure
of what happens in case of not found.

Or use s.index(...) instead of s.find(...). Then you get an exception if
the substring is not found, instead of having your program produce some
mysteriously-incorrect result.

Date Sujet#  Auteur
5 Nov 24 * Two python issues4Raymond Boute
5 Nov 24 +* Re: Two python issues2Piergiorgio Sartor
5 Nov 24 i`- Re: Two python issues (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
6 Nov 24 `- Re: Two python issues1Stefan Ram

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal