Re: regexps to objects

2012-07-27 Thread Peter Otten
andrea crotti wrote: > I have some complex input to parse (with regexps), and I would like to > create nice objects directy from them. > The re module doesn't of course try to conver to any type, so I was > playing around to see if it's worth do something as below, where I > assign a constructor t

regexps to objects

2012-07-27 Thread andrea crotti
I have some complex input to parse (with regexps), and I would like to create nice objects directy from them. The re module doesn't of course try to conver to any type, so I was playing around to see if it's worth do something as below, where I assign a constructor to every regexp and build an obje