def from_iso_time(timestring, use_dateutil=True):
    """Parse an ISO8601-formatted datetime string and return a datetime.time
    object.
    """
    if not _iso8601_time_re.match(timestring):
        raise ValueError('Not a valid ISO8601-formatted time string')
    if dateutil_available and use_dateutil:
        return parser.parse(timestring).time()
    else:
        if len(timestring) > 8:  # has microseconds
            fmt = '%H:%M:%S.%f'
        else:
            fmt = '%H:%M:%S'
        return datetime.datetime.strptime(timestring, fmt).time()
def from_iso_time ( timestring , use_dateutil = True ) : if not _iso8601_time_re . match ( timestring ) : raise ValueError ( 'Not a valid ISO8601-formatted time string' ) if dateutil_available and use_dateutil : return parser . parse ( timestring ) . time ( ) else : if len ( timestring ) > 8 : fmt = '%H:%M:%S.%f' else : fmt = '%H:%M:%S' return datetime . datetime . strptime ( timestring , fmt ) . time ( )
Parse an ISO8601-formatted datetime string and return a datetime.time
    object.