Another work-around that should work with the correct code and the broken code:
def start(self, filename, url, basename, *args, **kwargs): if len(args) >= 1: length = args[0] if len(args) >= 2: text = args[1] else: text = kwargs.get('text') else: length = kwargs.get('size') if kwargs.has_key('size') else kwargs.get('length') text = kwargs.get('text')
Another work-around that should work with the correct code and the broken code:
def start(self, filename, url, basename, *args, **kwargs): has_key( 'size') else kwargs. get('length' )
if len(args) >= 1:
length = args[0]
if len(args) >= 2:
text = args[1]
else:
text = kwargs.get('text')
else:
length = kwargs.get('size') if kwargs.
text = kwargs.get('text')