[Distutils] Comparison semantics for alphanumeric components of a version number

Ben Finney ben+python at benfinney.id.au
Fri Jun 5 16:12:13 CEST 2009


Ben Finney <ben+python at benfinney.id.au> writes:

> Those that do specify are *much* more obvious and simple in their
> comparison of individual components than what is currently in the
> ‘distutilsversion’ specification. Usually it's a simple case of “once
> we've got the individual components of a version string, they compare
> alphanumerically”.
[…]

> I'm arguing that, having got those components, and needing to compare
> them *within an individual component position* for ordering, the best
> candidate for “simple to describe and remember, and obvious to guess”
> is that the components are compared alphanumerically with no special
> exceptions.

As pointed out, I'm oversimplifying: the consensus I've seen includes
the semantic that sequences of digits in any component are to be treated
as integers and compared accordingly. I think that should be part of the
specification (and it was so obvious in my mind that I forgot to express
it :-)

-- 
 \       “Truth is stranger than fiction, but it is because fiction is |
  `\     obliged to stick to possibilities, truth isn't.” —Mark Twain, |
_o__)                                          _Following the Equator_ |
Ben Finney



More information about the Distutils-SIG mailing list