#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 roger.demetrescu):
Hi Simon,
I didn't know opertor.isSequenceType()... It works nice with this code...
:)
But if used in util.flatten() as a general utility, my only concern would
be with the direct use of strings...
The "old" version (which I stole from the Cookbook) and the "new" version
(using isSequenceType) would lead to different results:
{{{
#!python
>>> for x in old_flatten([55,'turbogears', True, {'a':111, 'b':222}]):
print x,
55 turbogears True {'a': 111, 'b': 222}
>>> for x in new_flatten([55,'turbogears', True, {'a':111, 'b':222}]):
print x,
55 turbogears True {'a': 111, 'b': 222}
>>> for x in old_flatten('turbogears'): print x,
turbogears
>>> for x in new_flatten('turbogears'): print x,
t u r b o g e a r s
}}}
Of course, documenting this behavior could solve the problem.
Anyway, I like the idea of moving the flatten() to util.py... :)
So what do we do now ? Should we open an improvement ticket (this one is
already closed) or would you mind doing the task yourself (since you have
write access to svn) ?
Thanks Simon... :)
[]s
Roger
--
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
-~----------~----~----~----~------~----~------~--~---