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 petere
Recipients petere
Date 2011-06-29.20:56:36
SpamBayes Score 4.7974225e-08
Marked as misclassified No
Message-id <1309380997.61.0.864474637719.issue12444@psf.upfronthosting.co.za>
In-reply-to
Content
It appears to be a pretty common mistake to think that the argument of str.strip/lstrip/rstrip is a substring rather than a set of characters.  To allow a more clearer notation, it would be nice if these functions also accepted an argument other than a string, for example a set or any collection.  Then you could write, for example:

a.strip({'a', 'b', 'c'})

I suggest to either add support for sets specifically, or more generally anything that supports the "in" operator.

I can try to code it up if it sounds acceptable.
History
Date User Action Args
2011-06-29 20:56:37peteresetrecipients: + petere
2011-06-29 20:56:37peteresetmessageid: <1309380997.61.0.864474637719.issue12444@psf.upfronthosting.co.za>
2011-06-29 20:56:36peterelinkissue12444 messages
2011-06-29 20:56:36peterecreate