Greetings, Correct me if I wrong, but shouldn't Python include function for version comparisons?
The problem of splitting a string like "10.3.40-beta" into tuple for cmp() seems to be dead simple, but the code gets bulky with excepting errors arised from converting resulting strings for arithmetic comparison. No wonder people advise to use ready distutils.version module, but that's not good to introduce such dependency for main program logic. What do you think about adding cmpversions(first, second, strict=false) based on distutils into main lib? Will it be more appropriate to isolate the function into "versions" module? Should it be rewritten to remove re dependency in this case? Distutils version comparisons: http://svn.python.org/view/python/branches/release26-maint/Lib/distutils/version.py?view=markup --anatoly t. _______________________________________________ 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