> On Dec 27, 2014, at 9:10 PM, Marcus Smith <[email protected]> wrote: > > In gives me a minor bit of pause. However any alternative that I can come up > with bothers me more, especially since I don't believe many people actually > even *use* a bare > and any alternative I can come up with has worse behavior > for operators which get much more use. > > what about making >=,<= also use the series concept? where does that go wrong? >
To be clear, you’re talking about doing something like: >1.7 is >1.7 AND !=1.7.* which would correlate to >1.7 OR ==1.7.*? Honestly, the thing that I dislike about that is it takes a behavior which is less intuitive (I do agree that the behavior of > is less intuitive) and applies to globally. I don't think people would expect >=1.7 to match 1.7.dev0 and given that I don't think people would expect >=1.7.0 to _not_match 1.7.dev0. I totally agree that the behavior of > isn't the greatest, I don't think the solution to that problem is to globally apply that particular wart. The only *reasonable* solutions I can think of are: 1. Make < and > both act as simple comparison operators, and have >1.7 and >1.7.0 both allow 1.7.1. This would include also allowing 1.7.dev0 to be <1.7 and <1.7.0. 2. Make < and > both act as "exclusive comparison operators", and which is the current behavior. 3. Make < and > both act as simple comparison operators, but include a special case that < does not ever match pre-releases of the version mentioned in the specifier. So <3 would not match a pre-released like 3.dev0, and <3.1 would not match a pre-release like 3.1.dev0 but would match a pre-release like 3.0.dev0. It may be that the correct solution is to just treat pre-releases as special and just switch to 3. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
