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 davidfraser
Recipients Neil Muller, davidfraser, georg.brandl
Date 2008-05-11.18:24:44
SpamBayes Score 0.00755704
Marked as misclassified No
Message-id <1210530296.6.0.340733558953.issue2809@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think this really addresses the issue properly...

The original docstring read:
+Note that not specifying sep (or using None) will cause\n\
+empty strings to be removed from the output. thus ' '.strip()\n\
+returns []. while ' '.strip(' ') returns ['', ''].
(Obviously strip is wrong here, it should be split)

The committed docstring reads:
+If sep is not specified or is None, any whitespace string is a
separator and leading and trailing whitespace is stripped before splitting.

But the point is not just that leading and trailing whitespace is
stripped; ''.strip() returns [] while ''.strip(' ') returns ['']. This
is probably the most unexpected corner case; it seems to be better to
say that empty strings are removed from the output.
History
Date User Action Args
2008-05-11 18:24:57davidfrasersetspambayes_score: 0.00755704 -> 0.00755704
recipients: + davidfraser, georg.brandl, Neil Muller
2008-05-11 18:24:56davidfrasersetspambayes_score: 0.00755704 -> 0.00755704
messageid: <1210530296.6.0.340733558953.issue2809@psf.upfronthosting.co.za>
2008-05-11 18:24:55davidfraserlinkissue2809 messages
2008-05-11 18:24:52davidfrasercreate