(self, headers, default_version, latest_version,
                 from_string=None)
Create an API Version object from the supplied headers.

        :param headers: webob headers
        :param default_version: version to use if not specified in headers
        :param latest_version: version to use if latest is requested
        :param from_string: create the version from string not headers
        :raises: webob.HTTPNotAcceptable
Create an API Version object from the supplied headers.
Create an API Version object from the supplied headers .
def __init__(self, headers, default_version, latest_version,
                 from_string=None):
        """Create an API Version object from the supplied headers.

        :param headers: webob headers
        :param default_version: version to use if not specified in headers
        :param latest_version: version to use if latest is requested
        :param from_string: create the version from string not headers
        :raises: webob.HTTPNotAcceptable
        """
        if from_string:
            (self.major, self.minor) = tuple(int(i)
                                             for i in from_string.split('.'))

        else:
            (self.major, self.minor) = Version.parse_headers(headers,
                                                             default_version,
                                                             latest_version)
def __init__ ( self , headers , default_version , latest_version , from_string = None ) : if from_string : ( self . major , self . minor ) = tuple ( int ( i ) for i in from_string . split ( '.' ) ) else : ( self . major , self . minor ) = Version . parse_headers ( headers , default_version , latest_version )