'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:

>>> "test".strip("t")
>>> 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)

I've filed a bug report at Sourceforge:

-- Gerhard

More information about the Python-list mailing list