
On Feb 27, 2011, at 4:36 PM, MRAB wrote:
As has been pointed out previously, it's easy to keep adding stuff, but once something is added we'll be stuck with it forever (virtually), so we need to be careful.
The real problem is that str.split() is already at its usability limits. The two separate algorithms are a perpetual source of confusion. It took years to get the documentation to be as accurate and helpful as they are now. Extending str.split() in any way would make the problem worse, so it shouldn't be touched again. It would helpful to consider its API to be frozen. Any bright ideas for additional capabilities should be aimed at new methods, modules, or recipes but not at str.split() itself. Useful as it is, we're fortunate that str.splitlines() was implementation as a separate method rather than as an extension to str.split(). IMO, this should be the model for the future. Raymond