def __init__(self, version):
        """
        Build a ``Version`` instance providing a string representing the
        version of the software component.


        @param version: a string representation of the software component
            of the following format: ``major.minor.patch``.
        """
        match = Version.REGEX_VERSION.match(version)
        if match is None:
            self.major = self.minor = self.patch = 0
        else:
            self.major = int(match.group(1))
            self.minor = int(match.group(2))
            self.patch = int(match.group(3))
def __init__ ( self , version ) : match = Version . REGEX_VERSION . match ( version ) if match is None : self . major = self . minor = self . patch = 0 else : self . major = int ( match . group ( 1 ) ) self . minor = int ( match . group ( 2 ) ) self . patch = int ( match . group ( 3 ) )
Build a ``Version`` instance providing a string representing the
        version of the software component.


        @param version: a string representation of the software component
            of the following format: ``major.minor.patch``.