[BangPypers] Do you think a more declarative RE syntax would make the world a better place ?

Senthil Kumaran orsenthil at gmail.com
Mon Aug 9 14:11:44 CEST 2010


On Mon, Aug 9, 2010 at 5:04 PM, Vishal <vsapre80 at gmail.com> wrote:
> # a(b|c)d+e*
>
> re1 = """
>
> - literal: 'a'
> - one_of: 'b,c'
> - one_or_more_of: 'd'
> - zero_or_more_of: 'e'
> """

It *could be* useful to new comers, but not very much.
This will add to the cost of covering it to regex code and will cause
significant delay in the programs which are using regex. So in big
apps it may not be of use.
Have you seen re.VERBOSE flag in the re module? Thats perhaps the
middle path (tm). :)


-- 
Senthil


More information about the BangPypers mailing list