def set_age(name, age):
    if not 0 < age < 150:
        raise ValueError('年龄超出范围了(1-150)')
    print('%s现在是%s岁了' % (name, age))


def set_age2(name, age):
    assert 0 < age < 150, '年龄超过范围了(1-150)'
    print('%s现在是%s岁了' % (name, age))


if __name__ == '__main__':
    set_age('li', 22)
    set_age2('li', 222)

0ed0d5b378e49e2eb1ad92c3575d4645d79a83af
<mask token>

def set_age(name, age):
    if not 0 < age < 150:
        raise ValueError('年龄超出范围了(1-150)')
    print('%s现在是%s岁了' % (name, age))


<mask token>

def set_age(name, age):
    if not 0 < age < 150:
        raise ValueError('年龄超出范围了(1-150)')
    print('%s现在是%s岁了' % (name, age))


def set_age2(name, age):
    assert 0 < age < 150, '年龄超过范围了(1-150)'
    print('%s现在是%s岁了' % (name, age))


<mask token>

def set_age(name, age):
    if not 0 < age < 150:
        raise ValueError('年龄超出范围了(1-150)')
    print('%s现在是%s岁了' % (name, age))


def set_age2(name, age):
    assert 0 < age < 150, '年龄超过范围了(1-150)'
    print('%s现在是%s岁了' % (name, age))


if __name__ == '__main__':
    set_age('li', 22)
    set_age2('li', 222)
