This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alexlc
Recipients alexlc
Date 2009-02-19.17:21:27
SpamBayes Score 0.0005458162
Marked as misclassified No
Message-id <1235064090.02.0.287381769922.issue5318@psf.upfronthosting.co.za>
In-reply-to
Content
Examples of bad behaviour:

>>> 'abacde'.lstrip('ab')
'cde'
>>> 'abaaacde'.lstrip('ab')
'cde'
>>> 'aabacde'.lstrip('aab')
'cde'
>>> 'abcede'.rstrip( 'de' )
'abc'
>>> 'abacdeaab'.strip('ab')
'cde'

Probably a few more similar to these will fail as well.

I have tested this with a fairly recent 2.5 (maybe 2.53 maybe 2.54), and
with 2.6.1. I have commented this to a friend and he recalls problems
similar to these with lstrip and rstrip a few years ago, so it might
have been an early 2.4 version or a late 2.3.

Thanks.
History
Date User Action Args
2009-02-19 17:21:30alexlcsetrecipients: + alexlc
2009-02-19 17:21:30alexlcsetmessageid: <1235064090.02.0.287381769922.issue5318@psf.upfronthosting.co.za>
2009-02-19 17:21:28alexlclinkissue5318 messages
2009-02-19 17:21:27alexlccreate