> Can someone explain this construct to me? You'd want to look for "list comprehension" documentation in Python
The code snipped can be rewritten as: errors = [] for field_name in required_fields: if self._is_empty(ticket[field_name]): errors.append((field_name, '%s is required' % field_name)) > errors = [(field_name, '%s is required' % field_name) > for field_name in required_fields > if self._is_empty(ticket[field_name])] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---