# coding=utf-8

def assert_uint(v, default=0):
    if isinstance(v, (int, long)):
        return max(0, v)
    else:
        return default

def assert_str(v, default=''):
    if isinstance(v, (str, unicode)):
        return v
    else:
        return default

