Em Domingo 23 Abril 2006 13:28, Alberto Valverde escreveu: > Oh, and you might want to jsonify objects built from classes you > cannot directly modify, like from an C extension. Ok, ok.. you can > wrap that C extension's object and provide the __json__ method > yourself... but I *personally* would favor writing a new rule to > overload a generic function. A matter of taste I guess...
Hmmm... I see two different approachs: one is OOP (__json__) making the objects know what to do; the other deals with generics. I also believe that we have to be very careful with what we use to solve our problems inside TG because that's what will be exposed to users. We should indeed opt for one alternative and doesn't make the other impossible, i.e., if the user thinks his problem can be best solved the other way, then this should be possible. Some clashes might happen on unexpected areas and they will happen but hey! We're working to get it better everyday, right? :-) We have the knife and the cheese... We just have to take care when we get to our hands. ;-) -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

