LWN.net Logo

New pattern-matching library (was: str.split with multiple individual split characters)

From:  Mike Meyer <mwm-tkOQc4lHIczYtjvyW6yDsg-AT-public.gmane.org>
To:  python-ideas-+ZN9ApsXKcEdnm+yROfE0A-AT-public.gmane.org
Subject:  New pattern-matching library (was: str.split with multiple individual split characters)
Date:  Mon, 28 Feb 2011 11:04:06 -0500
Message-ID:  <20110228110406.3ae7fec5@bhuda.mired.org>
Archive-link:  Article, Thread

Ok, with everyone at least noticing that regular expressions are hard,
if not actively complaining about it (including apparently Larry wall),
maybe it's time to add a second pattern matching library - one that's
more pythonic?

There are any number of languages with readable pattern matching -
Icon, Snobol and REXX all come to my mind. Searching pypi for "snobol"
reveals two snobol string matching libraries, and I found one on the
web based on icon.

Possibly we should investigate adding one of those to the standard
library, along with a cross-reference from the regexp documentation?

	 <mike
-- 
Mike Meyer <mwm-tkOQc4lHIczYtjvyW6yDsg@public.gmane.org>		http://www.mired.org/consulting.html
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


(Log in to post comments)

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds