A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-March/087764.html below:

[Python-Dev] version compare function into main lib

[Python-Dev] version compare function into main lib [Python-Dev] version compare function into main libanatoly techtonik techtonik at gmail.com
Fri Mar 27 08:42:56 CET 2009
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.
More information about the Python-Dev mailing list

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