'strip' documentation for beginners <g>

Gerhard Häring gerhard.haering at opus-gmbh.net
Tue Mar 4 13:39:20 CET 2003


Dan Rawson <daniel.rawson.take!this!out!@asml.nl> wrote:
> The documentation for string.strip states that it can take an optional
> second parameter, but it doesn't appear to work [...]

It appears to work for the string *methods*, but not with the string module:

#v+
>>> "test".strip("t")
'es'
>>> import string
>>> print string.strip("test", "t")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: strip() takes exactly 1 argument (2 given)
>>>
#v-

I've filed a bug report at Sourceforge:
http://sourceforge.net/tracker/index.php?func=detail&aid=697220&group_id=5470&atid=105470

-- Gerhard




More information about the Python-list mailing list