
Greg Falcon wrote:
On Thu, Aug 28, 2008 at 1:41 PM, Ron Adam <rrr@ronadam.com> wrote:
Josiah Carlson wrote:
The split/strip stuff is simple on purpose; it's fast. Tossing in regular expressions handling is a great way to slow down the general case, never mind if you actually want to split on the passed literal string. That's easy to remedy without making it overly complex.
text.split_pattern(' *\n+ *')
We're well off the original subject now, but what you propose can today be written
re.split(' *\n+ *', text)
Yep.
which I'd argue is just as easy to remember as your proposed new method, and in fact reads better, as it's much easier to guess that regex matching is going on.
Who's arguing? ;-) The main point is that extending the core syntax isn't needed. Extending the library should be considered first. Cheers, Ron