Finding methods, was Re: DSL design (was DSLs in perl and python)

2016-03-29 Thread Peter Otten
Rustom Mody wrote: > [How BTW did you folks go about unearth that groupindex?? Dont see it in > [docs] While it's there https://docs.python.org/dev/library/re.html#re.regex.groupindex my personal search algorithm for this category of questions is mostly "I saw something like that before", then

Re: DSL design (was DSLs in perl and python)

2016-03-29 Thread Jussi Piitulainen
Rustom Mody writes: > [How BTW did you folks go about unearth that groupindex?? Dont see it > in docs] The following reveal its existence: dir(re.compile("")) help(re.compile("")) But help only lists it as one of "data descriptors defined here" (in Python 3.4.3). I think I just guessed from its

Re: DSL design (was DSLs in perl and python)

2016-03-29 Thread Chris Angelico
On Wed, Mar 30, 2016 at 12:28 AM, Rustom Mody wrote: > Thanks once again to Peter and Jussi. > With that groupindex pointer, this tiny dsl for re's is here > https://github.com/rusimody/redsl > [How BTW did you folks go about unearth that groupindex?? Dont see it in docs] Depending on your versio

DSL design (was DSLs in perl and python)

2016-03-29 Thread Rustom Mody
On Saturday, March 19, 2016 at 7:37:52 AM UTC+5:30, Rustom Mody wrote: > On Friday, March 18, 2016 at 6:52:53 PM UTC+5:30, Peter Otten wrote: > > Rustom Mody wrote: > > > > > On Friday, March 18, 2016 at 4:17:06 AM UTC+5:30, MRAB wrote: > > >> Stick an "x" on the end of the regex: /something/x or