Something similar to what @rchang wrote; you could override the default for the write() method with with super
import configparser
class CustomConfigParser(configparser.ConfigParser):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def write(self, fp, space_around_delimiters = False):
return super().write(fp, space_around_delimiters)