def is_half(char):
    """是否半角字符

    Examples:
        >>> is_half(',')
        True
        >>> is_half('。')
        False
    """
    if isinstance(char, str):
        char = ord(char)
    return 0x0020 <= char <= 0x007E