New submission from Szieberth Ádám:
I just faced the following bug (v3.4.2):
t1 = '#5 amarg (Concession)'
t2 = '#6 ironman (Concession)'
s = ' (Concession)'
t1.rstrip(s)
'#5 amarg'
t2.rstrip(s)
'#6 ironma'
t1[:-len(s)]
'#5 amarg'
t2[:-len(s)]
'#6 ironman'
--
messages: 230343
Antoine Pitrou added the comment:
It may be unexpected, but it's not a bug. From the documentation:
Return a copy of the string with trailing characters removed. The chars
argument is a string specifying the set of characters to be removed. If omitted
or None, the chars argument defaults to