On Dec 6, 2007 6:24 PM, Roger Demetrescu <[EMAIL PROTECTED]> wrote:
>
> Hei Florent !

Hallo Roger!

>
> Maybe we should change that code to something like:
>
>
> if isinstance(v, dict):
>     res[k] = encode_utf8(v)
> elif isinstance(v, list):
>     res[k] = [vv.encode('utf-8') for vv in v]
> elseif isinstance(v, basestring):
>     res[k] = v.encode('utf-8')
> else:
>     raise Exception("some warning about this unsupported type")

I had the same idea in my small head :). I must also add some test
case to make sure we don't get a regression on this part (Last time I
committed this encode thingy I added some tests so it should be pretty
easy to add more).

Looking at that part of the code I see that my monkey patch for the
CP's before_main is technically correct but quite ugly... :( using
self as an argument in a free function could be considered bad
behavior...
I'll need to fix this too just for the cleansing.

Regards,
Florent.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to