comparison decoupage/formatters.py @ 23:d1b1019d9254

unfold the list out of the reverseiterator which otherwise gets consumed and funky
author egj@socialplanning.org
date Mon, 04 Jan 2010 04:26:32 +0000
parents a8d36caa8f09
children 6b27461955d1
comparison
equal deleted inserted replaced
22:a8d36caa8f09 23:d1b1019d9254
86 def __call__(self, request, data): 86 def __call__(self, request, data):
87 87
88 data['files'] = sorted(data['files'], key=lambda x: x['name'].lower()) 88 data['files'] = sorted(data['files'], key=lambda x: x['name'].lower())
89 89
90 if 'reverse' in self.args: 90 if 'reverse' in self.args:
91 data['files'] = reverse(data['files']) 91 data['files'] = list(reversed(data['files']))
92 92
93 93
94 class FilenameDescription(FormatterBase): 94 class FilenameDescription(FormatterBase):
95 """substitute the description for the filename""" 95 """substitute the description for the filename"""
96 96