> from simplegeneric import generic > > @generic > def jsonify(obj): > '''existing "default" method rules go here''' > > class GenericJSON(JSONEncoder): > def default(self, obj): > return jsonify(obj) > > Maybe a tweak or two needs to be made, but that is largely all that > needs to be done to go from "95%" to "100%".
If you wrapped the import in a try/except and only added the generic function stuff if simplegeneric is present on the system I think everybody would be 100% happy, even jorge ;) --Mark Ramm -- You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=.
