3.1.9.7. RevisionVersion
¶
-
class
PyDvi.Tools.RevisionVersion.
RevisionVersion
(version)[source]¶ Bases:
object
This class implements a revision version of the form vx.y.z where x, y and z are the major, minor and revision number, respectively.
To compare two version, the version x.y.z is converted to an integer using the following formulae: (x * scale + y) * scale + z. Thus x, y and z must be less than the
scale
.- version
- could be a version string or a sequence of three integers.
Examples:
RevisionVersion('v0.1.2') RevisionVersion((0,1,2)) RevisionVersion([0,1,2])
Two Instances can be compared using operator:
==
,<
,>
,<=
,>=
.An instance can be formated using
str()
function.-
scale
= 1000000¶ default scale value