On Tue, Mar 31, 2009 at 9:55 AM, Robert Bradshaw <rober...@math.washington.edu> wrote: > > On Mar 30, 2009, at 6:36 AM, Henryk Trappmann wrote: > >> >> Ok, here is a first shot that has 100% coverage (except dumps): >> http://github.com/bo198214/hyperops/raw/ >> 09e1da3372d7b431cdf557ffe164df9f91c08e68/formal_powerseries.py >> >> I finally decided to name it FPSRing, for Formal Power Series Ring. It >> resides in sage.rings.formal_powerseries > > I'd rather it were named the more verbose, but significantly more > explicit, FormalPowerSeriesRing. This fits better with the naming of > all the other rings, and we do have tab completion after all.
I prefer FormalPowerSeriesRing, as well. >> 2. I have no idea how to approach pickling, how to get dumps to work. >> I think that the attribute functions are the problem like William >> said. > > The basic idea is to implement a __reduce__ method, which returns a > tuple > > callable, (args,to,pass,to,callable) > > and then on unpickling (loads) it will return callable > (args,to,pass,to,callable) as the re-constructed object. If my guess about you loading/attaching local files was correct, then the first thing you should do is put your code into the Sage library and try the picking test again. The default picking/unpicking mechanism might just work. Franco -- --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---