def _is_punctuation(char):
    'Checks whether `chars` is a punctuation character.'
    cp = ord(char)
    if ((33 <= cp <= 47) or (58 <= cp <= 64) or (91 <= cp <= 96) or (123 <= cp <= 126)):
        return True
    cat = unicodedata.category(char)
    if cat.startswith('P'):
        return True
    return False
Checks whether `chars` is a punctuation character.
def _is_punctuation(char):
    
    cp = ord(char)
    if ((33 <= cp <= 47) or (58 <= cp <= 64) or (91 <= cp <= 96) or (123 <= cp <= 126)):
        return True
    cat = unicodedata.category(char)
    if cat.startswith('P'):
        return True
    return False