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

geremy condra debatem1 at gmail.com
Tue Mar 1 23:50:45 CET 2011

On Tue, Mar 1, 2011 at 1:23 PM, Guido van Rossum <guido at python.org> wrote:
> On Tue, Mar 1, 2011 at 12:25 PM, Tal Einat <taleinat at gmail.com> wrote:
>> On Tue, Mar 1, 2011 at 9:53 PM, geremy condra <debatem1 at gmail.com> wrote:
>>> It's unfortunate that there isn't a good way to do this kind of
>>> long-range work within the auspices of Python. I can imagine a number
>>> of projects like this that fail to attract interest due to low
>>> perceived chances of success and a dearth of community feedback.
>> Once a good library had a solid foundation, it could plug itself into some
>> widely used Python programs and gain publicity and support from there,
>> before pushing for inclusion in the stdlib.
>> A good example is Django's URL mapping, which currently uses regexps. I
>> think it would be possible to get Django to support an alternate pattern
>> matching method, in addition to regexps, since this would make learning
>> Django easier for developers who don't grok regexps.
> Ah, but geremy is complaining about work that cannot be done as a
> library, e.g. syntax changes. This is because I suggested a better
> approach to matching would probably require syntax changes. I don't
> have an answer -- it may be easier to create a whole new language and
> experiment with matching syntax than it is to get a PEP approved for a
> matching syntax extension to Python... That's just how it goes for
> mature languages. Try getting new syntax added to C++, Java or
> JavaScript... :-)

Erm... this actually isn't what I was talking about at all. I was
basically just saying that I think it would be good if Python had
better tools to bring attention to issues that might be considered for
inclusion if a better way could be found.

Geremy Condra

More information about the Python-ideas mailing list