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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4