Dear Sage devel, Jullian RĂ¼th and I were staying a bit longer after sage days and trying to get the Function Fields code up to a quality where it deserves to be merged. I've made a huge review patch which I will upload shortly. There is however one thing that remains broken, namely pickling. For some reason there are some attributes added the the function field which I don't have a clue where they precisely come from and neither why they cannot be pickled. I've already located the attributes wich are to blame as shown in the example below. Any help in getting this to work will be greatly appreciated.
sage: K.<x> = FunctionField(QQ) sage: dumps(K) Traceback (most recent call last): ... PicklingError: Can't pickle <type 'dictproxy'>: attribute lookup __builtin__.dictproxy failed sage: del K._gens sage: del K._gen sage: del K._element_constructor sage: dumps(K) 'x\x9cm\x90\xcbO\xc2@\x10\xc6\xa3\x08\xea\n\xe2\x03|?\x0e^\xe0etc.. etc.. etc... Thanks in advance, Maarten and Julian ps. the code can be found at http://trac.sagemath.org/sage_trac/ticket/9054 pps. the relevant parts of the __init__ method def __init__(self, constant_field, names, category=CAT): """ Create a rational function field in one variable. """ ParentWithGens.__init__(self, self, names=names, category = category) R = constant_field[names[0]] self._hash = hash((constant_field, names)) self._constant_field = constant_field self._ring = R self._field = R.fraction_field() self._populate_coercion_lists_(coerce_list=[self._field]) self._gen = self(R.gen()) -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
