homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: string.strip behaves strangly
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: duplicate
Dependencies: 5439 Superseder:
Assigned To: Nosy List: dwjang, ezio.melotti
Priority: normal Keywords:

Created on 2009年03月08日 05:28 by dwjang, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (2)
msg83301 - (view) Author: Dongwook Jang (dwjang) Date: 2009年03月08日 05:28
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
msg83303 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009年03月08日 05:33
Duplicated of #5439 
History
Date User Action Args
2022年04月11日 14:56:46adminsetgithub: 49690
2009年03月08日 08:08:59loewissetstatus: open -> closed
dependencies: + string.strip behaves strangly
resolution: duplicate
2009年03月08日 05:33:32ezio.melottisetnosy: + ezio.melotti
messages: + msg83303
2009年03月08日 05:28:18dwjangcreate

AltStyle によって変換されたページ (->オリジナル) /