Message245311
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. |
|
Date |
User |
Action |
Args |
2015-06-13 13:29:53 | o1da | set | recipients:
+ o1da |
2015-06-13 13:29:53 | o1da | set | messageid: <1434202193.55.0.291762155512.issue24445@psf.upfronthosting.co.za> |
2015-06-13 13:29:53 | o1da | link | issue24445 messages |
2015-06-13 13:29:53 | o1da | create | |
|