On 05/11/2024 15.48, Raymond Boute wrote:
L.S.,
Python seem to suffer from a few poor design decisions regarding strings
and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not found
by "find", since -1 currently refers to the la
Op 5/11/2024 om 15:48 schreef Raymond Boute via Python-list:
L.S.,
Python seem to suffer from a few poor design decisions regarding
strings and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not
found by "find", since -1 current
On 6/11/24 10:08, Jason Friedman via Python-list wrote:
(a) An error-prone "feature" is returning -1 if a substring is not found
by "find", since -1 currently refers to the last item. An example:
>>> s = 'qwertyuiop'
>>> s[s.find('r')]
'r'
>>> s[s.find('p')]
'p'
>>> s[s.find('a')]
'p'
>
> (a) An error-prone "feature" is returning -1 if a substring is not found
> by "find", since -1 currently refers to the last item. An example:
>
> >>> s = 'qwertyuiop'
> >>> s[s.find('r')]
> 'r'
> >>> s[s.find('p')]
> 'p'
> >>> s[s.find('a')]
> 'p'
> >>>
>
> If "find" is unsuccessful, an er
On 05Nov2024 15:48, Raymond Boute wrote:
Python seem to suffer from a few poor design decisions regarding
strings and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not
found by "find", since -1 currently refers to the last item.
L.S.,
Python seem to suffer from a few poor design decisions regarding strings
and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not found
by "find", since -1 currently refers to the last item. An example:
>>> s = 'qwertyuiop'