def strip_punctuation_space(value):
def strip_punctuation(string):<EOL><INDENT>replacement_list = (<EOL>('<STR_LIT>',  '<STR_LIT:.>'),<EOL>('<STR_LIT>',  '<STR_LIT::>'),<EOL>('<STR_LIT>',  '<STR_LIT:(>'),<EOL>('<STR_LIT>',  '<STR_LIT:)>'),<EOL>)<EOL>for match, replacement in replacement_list:<EOL><INDENT>string = string.replace(match, replacement)<EOL><DEDENT>return string<EOL><DEDENT>if value == None:<EOL><INDENT>return None<EOL><DEDENT>if type(value) == list:<EOL><INDENT>return [strip_punctuation(v) for v in value]<EOL><DEDENT>return strip_punctuation(value)<EOL>
Strip excess whitespace prior to punctuation.