[New-bugs-announce] [issue5439] string.strip behaves strangly

Dongwook Jang report at bugs.python.org
Sun Mar 8 06:28:15 CET 2009


New submission from Dongwook Jang <jang.dongwook at gmail.com>:

Python 2.4.2 (#1, Mar  4 2008, 22:56:43)
[GCC 3.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> temp = "a/b/c"
>>> temp.strip("a")
'/b/c'
>>> temp.strip("a/")
'b/c'
>>> temp.strip("a/b")
'c'
>>> temp.strip("a/b/")
'c'
>>>


So, in the second command from the last, I expected '/c' but it gives
only 'c'.
Why? Is it a bug or a feature that I don't understand?

Thanks,
DW

----------
components: Interpreter Core
messages: 83300
nosy: dwjang
severity: normal
status: open
title: string.strip behaves strangly
type: behavior
versions: Python 2.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5439>
_______________________________________


More information about the New-bugs-announce mailing list