parse method

On this page

parse

Converts the string representation of a size to its class equivalent.

def parse(cls, s):
    ...
Parameter Type Description
s str A string that contains a size to convert.

Returns: Size: An instance of Size class that is equivalent to the value specified in s parameter.

Raises Description
ValueError s does not represent a size in a valid format.

See Also

On this page