[Zope] Zope (X)3 FAQ
Oliver Bleutgen
myzope@gmx.net
Mon, 07 Apr 2003 15:39:19 +0200
Johan Carlsson [EasyPublisher] wrote:
> I think it should use a float instead of a string because it would make it
> easier to identify the occurrence of an older version than X.X.
>
> Integers would work as well, but I have actually change the Easy
> Publisher upgrade method to use a float, so float is preferred for me ;-)
> (The integer part of the float represents the main version number and
> the fraction represents
> the minor version (I know it will be difficult because of the three
> version standard if the second or
> third digit become greater that 9, I have solved it by never letting
> them be greater that 9).
>
> Floats are easier than tuples, I like it easy ;-)
None Zope (X)3 related 2c:
But wouldn't tuples in python be the ideal structure to store stuff like
version numbers?
>>> version_list = [(2,), (1, 1, 2), (1, 1), (1,), (1, 19)]
>>> version_list.sort()
>>> verlist
[(1,), (1, 1), (1, 1, 2), (1, 19), (2,)]
cheers,
oliver