On Thu, Dec 10, 2009 at 05:41:01AM +0000, Michael Mysinger wrote: > Floris Bruynooghe <floris.bruynooghe <at> gmail.com> writes: > > > On Tue, Dec 08, 2009 at 08:53:18PM -0800, Michael Mysinger wrote: > > > I don't know what notation this versioning schema was trying for, > > > especially > in regards to what the +'s mean: > > > N.N[.N]+[abc]N[.N]+[.postN+][.devN+] > > > > > The full regex (stripped from named groups) is the rather unreadable: > > \d+\.\d+(\.\d+)*([abc]?\d+(\.\d+)*)?((\.post\d+)?(\.dev\d+)?)? > > The ()? around the combination of post and dev is not needed. I also think > [abc]? should just be [abc], as one letter is required to proceed the digit in > that case, and the full regular expression does help to distinguish exactly > which of those two is required by the PEP.
You are right > If your regular expression with my modifications above is right, > then using the substitions 'N for \d+', '{} for []', '[] for ()?' > and '+ for *' leaves: > > N.N[.N]+[{abc}N[.N]+][.postN][.devN] > > Notice that the last two +'s are gone, and overall I think this is more > consistent psuedo-code. That's quite readable and more consistent then the original pseudo-code, I like it. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com