From: Noel O'B. <bao...@gm...> - 2007-11-19 16:12:15
|
On 19/11/2007, Karol Langner <kar...@kn...> wrote: > On Monday 19 November 2007 16:29, you wrote: > > Good point. The user just needs to call listify() beforehand. In that > > case, listify() should probably return a dictionary, rather than > > altering the ccData object itself. The dictionary can be written with > > whatever JSON library the user wants to use... > > > > Great! I think we have a winner :-) > > I recently added the "getattributes" method, which listifies and returns such > a dictionary (and later arrayifies) - so that's all that needs to be called. Well, my point was just that there's no need to call arrayify() if listify just returns a dictionary. It's also a cleaner solution as it means that the ccData object will not be perturbed. listify() is not used by any other code, as far as I know. > I'll go with anything here. So we are choosing not to provide any intrinsic > JSON support? I think so. If there are lots of different libraries that a user might want to use, the best solution is to allow the user to choose whichever they want. > What about pickle? pickle works already just like for any other Python object. See the docs on the wiki at: http://cclib.sourceforge.net/wiki/index.php/Using_cclib > Karol > > -- > written by Karol Langner > Mon Nov 19 16:55:31 CET 2007 > |