Uranium
Application Framework
UM.Version.Version Class Reference

Represents a version number, like "3.2.8" and allows comparison of those numbers. More...

Public Member Functions

def __init__
 Constructs the version instance from a string representing the version. More...
 
def getMajor (self)
 Gets the major version number. More...
 
def getMinor (self)
 Gets the minor version number. More...
 
def getRevision (self)
 Gets the revision or patch version number. More...
 
def __gt__
 Indicates whether this version is later than the specified version. More...
 
def __lt__
 Indicates whether this version is earlier than the specified version. More...
 
def __eq__
 Indicates whether this version is equal to the specified version. More...
 
def __ge__
 Indicates whether this version is later or equal to the specified version. More...
 
def __le__
 Indicates whether this version is earlier or equal to the specified version. More...
 
def __str__ (self)
 Returns a string representation containing the major, minor and revision number. More...
 
def __hash__ (self)
 Returns a number reasonably representing the identity of the version. More...
 

Detailed Description

Represents a version number, like "3.2.8" and allows comparison of those numbers.

Constructor & Destructor Documentation

◆ __init__()

def UM.Version.Version.__init__ (   self,
  version 
)

Constructs the version instance from a string representing the version.

The string representation may have dashes or underscores that separate the major, minor and revision version numbers. All text is ignored.

Parameters
versionA string or bytes representing a version number.

Member Function Documentation

◆ __eq__()

def UM.Version.Version.__eq__ (   self,
  other 
)

Indicates whether this version is equal to the specified version.

Implements the == operator.

Parameters
otherEither another version object or a string representing one.

◆ __ge__()

def UM.Version.Version.__ge__ (   self,
  other 
)

Indicates whether this version is later or equal to the specified version.

Implements the >= operator.

Parameters
otherEither another version object or a string representing one.

◆ __gt__()

def UM.Version.Version.__gt__ (   self,
  other 
)

Indicates whether this version is later than the specified version.

Implements the > operator.

Parameters
otherEither another version object or a string representing one.

◆ __hash__()

def UM.Version.Version.__hash__ (   self,
  int 
)

Returns a number reasonably representing the identity of the version.

◆ __le__()

def UM.Version.Version.__le__ (   self,
  other 
)

Indicates whether this version is earlier or equal to the specified version.

Implements the <= operator.

Parameters
otherEither another version object or a string representing one.

◆ __lt__()

def UM.Version.Version.__lt__ (   self,
  other 
)

Indicates whether this version is earlier than the specified version.

Implements the < operator.

Parameters
otherEither another version object or a string representing one.

◆ __str__()

def UM.Version.Version.__str__ (   self,
  str 
)

Returns a string representation containing the major, minor and revision number.

Such as "3.2.8".

◆ getMajor()

def UM.Version.Version.getMajor (   self,
  int 
)

Gets the major version number.

The major version number is the first number of the version: "3" in the version "3.2.8".

◆ getMinor()

def UM.Version.Version.getMinor (   self,
  int 
)

Gets the minor version number.

The minor version number is the second number of the version: "2" in the version "3.2.8".

◆ getRevision()

def UM.Version.Version.getRevision (   self,
  int 
)

Gets the revision or patch version number.

The revision version number is the third number of the version: "8" in the version "3.2.8".


The documentation for this class was generated from the following file: