def _getChar(self, char_spec):
if len(char_spec) >= <NUM_LIT:4> and all(c in string.hexdigits for c in char_spec):<EOL><INDENT>char_number = int(char_spec, <NUM_LIT:16>)<EOL>if char_number not in range(<NUM_LIT>):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return chr(char_number)<EOL><DEDENT>elif len(char_spec) == <NUM_LIT:1>:<EOL><INDENT>return char_spec<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>
Returns character from given code point or character.