Do not use second argument to itertools.count in other place

This commit is contained in:
ZyX 2013-04-13 15:16:45 +04:00
parent 4449489e59
commit 25627363b0

View File

@ -44,12 +44,12 @@ def getconfigargspec(obj):
argspec = getargspec(obj) argspec = getargspec(obj)
args = [] args = []
defaults = [] defaults = []
for i, arg in zip(count(-1, -1), reversed(argspec.args)): for i, arg in zip(count(1), reversed(argspec.args)):
if ((arg == 'segment_info' and getattr(obj, 'powerline_requires_segment_info', None)) or if ((arg == 'segment_info' and getattr(obj, 'powerline_requires_segment_info', None)) or
arg == 'pl'): arg == 'pl'):
continue continue
if argspec.defaults and len(argspec.defaults) >= -i: if argspec.defaults and len(argspec.defaults) >= i:
default = argspec.defaults[i] default = argspec.defaults[-i]
defaults.append(default) defaults.append(default)
args.append(arg) args.append(arg)
else: else: