Exemplo n.º 1
0
 def prefix_flag(self, prefix, args, quotes=False):
     form_str = '{}"{}"' if quotes else '{}{}'
     return [form_str.format(prefix, args) for arg in flatten(args)]
Exemplo n.º 2
0
 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)