'strip' documentation for beginners <g>

Dan Rawson daniel.rawson.take!this!out! at asml.nl
Tue Mar 4 07:46:16 EST 2003


Gerhard Häring wrote:
> 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
OK, thanks.  At least I'm not losing what's left of my mind <g>





More information about the Python-list mailing list