#678: [PATCH] Toolbox admi18n is not handling files grouping properly
------------------------------+---------------------------------------------
Reporter: roger.demetrescu | Owner: anonymous
Type: defect | Status: closed
Priority: normal | Milestone: 0.9a2
Component: Toolbox | Version:
Severity: normal | Resolution: fixed
Keywords: |
------------------------------+---------------------------------------------
Comment (by simon):
Here is how I would do it:
{{{
def flatten_sequence(seq):
for item in seq:
if isSequenceType(item) and not isinstance(item, basestring):
for item in flatten_sequence(item):
yield item
else:
yield item
}}}
I really don't like the "throw anything in and it will work" approach. If
such behaviour is desired one can always combines flatten() with
util.ensure_sequence().
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/678>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---