Bug in string.lstrip?

Brian Gough bjg at network-theory.co.uk
Mon Aug 23 18:20:30 CEST 2004


Brian <brian at nospam.com> writes:

> Hello - has anyone else had trouble with string.lstrip stripping too 
> much? Here's what I get (Python 2.3.4):
> 
>  >>> import string
>  >>> string.lstrip("test/one/two/a.b.c", "test/one/")
> 'wo/a.b.c'

The second argument of lstrip has a different meaning from what you
think it does --- see the library documentation for the string module
for details.

-- 
Brian Gough

Network Theory Ltd,
Publishing the Python Manuals --- http://www.network-theory.co.uk/python/



More information about the Python-list mailing list