On Sunday, 10 August 2014 17:47:48 UTC+1, Ian wrote: > On Sun, Aug 10, 2014 at 10:34 AM, Paul Wolf <paulwolf...@gmail.com> wrote: > > > For instance, a template language that validates the output would have to > > do frequency analysis. But that is getting too far off the purpose of > > strgen, although such a mechanism would certainly have its place. > > > > I don't think that would be necessary. The question being asked with > > validation is "can this string be generated from this template", not > > "is this string generated from this template with relatively high > > probability".
Sorry, I meant frequency incidence within a produced string. And I understood Devin's point to be: For any given strgen expression that produces a set of strings, is there always a regex expression that captures the exact same set. And therefore is it not theoretically the case (leaving aside verbosity) that one of the syntaxes is superfluous (strgen). I think that is an entirely valid and interesting question. I'd have said before that it is not the case, but now I'm not so sure. I would still be sure that the strgen syntax is more fit for purpose for generating strings than regex on the basis of easy-of-use. -- https://mail.python.org/mailman/listinfo/python-list