

def python_value(self, value):
    if value:
        if isinstance(value, basestring):
            pp = (lambda x: x.time())
            return format_date_time(value, self.formats, pp)
        elif isinstance(value, datetime.datetime):
            return value.time()
    if ((value is not None) and isinstance(value, datetime.timedelta)):
        return (datetime.datetime.min + value).time()
    return value

dataset/ETHPy150Open coleifer/peewee/peewee.py TimeField.python_value/original