From: Karol L. <kar...@kn...> - 2007-11-19 14:42:45
|
On Monday 19 November 2007 15:21, Noel O'Boyle wrote: > On 19/11/2007, Karol Langner <kar...@kn...> wrote: > > On Monday 19 November 2007 14:38, Noel O'Boyle wrote: > > > Do we really need support for three JSON libraries? We can just bundle > > > simplejson (or one of the others if their licenses permit) with cclib. > > > > I don't like it either, but it seems to be the simplest fix for now if I > > want to use cjson. Bundling is probably the best final solution. I would > > opt for cjson in that case, although it is a C extension and would > > require compilation upon install, which cclib has avoided up to now. > > Yes - I wouldn't like to do this for the 'core' parsing. Does this mean you would consider C extensions appropriate for ex. cclib.methods if they made them ore efficient? > How about > changing so that rather than passing in a module, you just pass in the > dump/load function? Then cclib wouldn't have to do any of this. The > user would do "from simplejson import dumps", and then pass "dumps" as > a parameter to write_json. I'm not sure I understand: you propose to bundle a pure python JSON module for the default (simplejson or json), and add an optional dumps/loads argument if the user wants an alternate function? - Karol -- written by Karol Langner Mon Nov 19 15:36:43 CET 2007 |