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 gvanrossum
Recipients abarry, barry, gvanrossum, mrabarnett, rhettinger, serhiy.storchaka, syeberman, veky
Date 2016-12-12.16:16:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I like the proposal. I agree that filter(None, ...) is not discoverable (and has its own magic).

So the proposal would be: prune=False -> empty strings stay, prune=True, empty strings are dropped, prune=None (default) use True if sep is None, False otherwise. Right?

Some end cases:

- ''.split(None, prune=True) -> ['']
- 'x  x'.split(None, prune=True) -> ['x', '', 'x']


While we're here I wish there was a specific argument we could translate .split(None) into, e.g. x.split() == x.split((' ', '\t', '\n', '\r', '\f')) # or whatever set of strings
Date User Action Args
2016-12-12 16:16:06gvanrossumsetrecipients: + gvanrossum, barry, rhettinger, syeberman, mrabarnett, serhiy.storchaka, veky, abarry
2016-12-12 16:16:06gvanrossumsetmessageid: <>
2016-12-12 16:16:06gvanrossumlinkissue28937 messages
2016-12-12 16:16:06gvanrossumcreate