string.strip
Duncan Booth
duncan at NOSPAMrcp.co.uk
Fri Nov 8 04:30:05 EST 2002
Stano Paska <paska at kios.sk> wrote in news:mailman.1036744990.32317.python-
list at python.org:
> in documentation: string.strip(s[, chars])
> but in real life strip takes only 1 parameter
>
> I have python 2.2.2
There seems to be a mistake in the documentation for the string module. The
simplest solution is to stop using the string module for most purposes, use
the strip method on strings as that works as advertised:
>>> "--ccc--".strip("-")
'ccc'
>>>
--
Duncan Booth duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
More information about the Python-list
mailing list