def prefix_flag(self, prefix, args, quotes=False): form_str = '{}"{}"' if quotes else '{}{}' return [form_str.format(prefix, args) for arg in flatten(args)]
def __setattr__(self, name, value): try: attributes = object.__getattribute__(self, 'attributes') except AttributeError: attributes = { } if name not in attributes: object.__setattr__(self, name, value) else: attributes[name] += flatten(value)