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

I accidental dropped the list from my reply to his comment. I'm forwarding that and his reply (with permission). <mike Begin forwarded message: Date: Mon, 28 Feb 2011 09:59:48 -0800 From: Guido van Rossum <guido@python.org> To: Mike Meyer <mwm@mired.org> Subject: Re: [Python-ideas] New pattern-matching library (was: str.split with multiple individual split characters) On Mon, Feb 28, 2011 at 9:40 AM, Mike Meyer <mwm@mired.org> wrote:
On Mon, 28 Feb 2011 09:15:36 -0800 Guido van Rossum <guido@python.org> wrote:
That doesn't mean you shouldn't try -- I've been wrong before. But maybe instead of striving for stdlib inclusion (which these days is pretty much only accessible for proven successful 3rd party libraries), you should try to create a new 3rd party pattern matching library. While admittedly this gives it a disadvantage to the re module, I really don't think we should experiment in the stdlib, since the release cycle and backwards compatibility requirements make the necessary experimentation too cumbersome.
How about if it's bundled with new language functionality? Take Icon's failure/backtrack/alternation features, add them to Python, then put together a string parsing facility that leverages that?
You'd have to write a thorough PEP, do a reference implementation, and go through a long process of discussion before getting it accepted. It can be done, but nothing of the scale has been done in a long time (most syntax PEPs these days are mere tweaks in comparison). Even before writing the PEP you should probably start with a serious brainstorm. Are you up for it? I support you (or anyone) doing it, and may possibly comment in various stages on ideas or designs, but I can't pull this cart myself, nor can I guarantee success. Maybe you can find a few other like-minded folks to help with the various stages of the design? How much deep knowledge about Python's syntax and semantics do you have? PS. Did you intentionally drop python-ideas from the CC header? -- --Guido van Rossum (python.org/~guido) -- Mike Meyer <mwm@mired.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
participants (1)
-
Mike Meyer