[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread o1da

New submission from o1da:

Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> text = 'test1/1.jp2'
>>> text.rstrip('.jp2')
'test1/1'
>>> text = 'test1.jp2'
>>> text.rstrip('.jp2')
'test1'
>>> text = 'test1/2.jp2'
>>> text.rstrip('.jp2')
'test1/'
>>> 

Why the rstrip function stripped '2' from the last example? I think that it is 
a bug.

--
messages: 245311
nosy: o1da
priority: normal
severity: normal
status: open
title: rstrip strips what it doesn't have to
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue24445>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24445] rstrip strips what it doesn't have to

2015-06-13 Thread o1da

o1da added the comment:

Ok, thank you. I thought it trims whole sequence or nothing.

--
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue24445>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com