'strip' documentation for beginners <g>
daniel.rawson.take!this!out! at asml.nl
Tue Mar 4 13:47:02 CET 2003
Alex Martelli wrote:
> Dan Rawson wrote:
>>The documentation for string.strip states that it can take an optional
>>second parameter, but it doesn't appear to work:
> If it states that, that's a but in the documentation, I think. The
> strip method of strings DOES (at least in 2.2.2, I don't think that
> worked in 2.2.1) -- but string.strip exists basically only for
> backwards compatibility, thus it's reasonable to avoid enhancing
> it with new features such as the optional "what am I stripping"
> alex at lancelot bin]$ python2.2
> Python 2.2.2 (#1, Oct 24 2002, 11:43:01)
> [GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: strip() takes exactly 1 argument (2 given)
Thanks . . . . I couldn't find anything about it in the 2.2.2 release notes, but maybe I missed it.
More information about the Python-list