On 2015-02-12 18:37, Gisle Vanem wrote: > Tim Chase wrote:> So the test should actually be something like > > > if LooseVersion(QtCore.PYQT_VERSION_STR) < > > LooseVersion("4.10"): balk() > > That's exactly what they do now in IPython/utils/version.py with > the comment: > Utilities for version comparison > It is a bit ridiculous that we need these. > > Not sure why this is "ridiculous".
Well, if you're storing them as strings, then duh, you need the helper utilities. If you store them as comparable tuples, then it's not a problem. :-/ # library.VERSION = (3, 14, 15) if library.VERSION < (2, 3, 18): complain() It does become harder to mark things as alpha/beta/pre/rc, but something Enum-like might suffice for that in a fourth field of the tuple. -tkc -- https://mail.python.org/mailman/listinfo/python-list