Hi Nicolas, Florent and Maarten,
On 13 Sep., 09:36, "Nicolas M. Thiery"
wrote:
> On Tue, Sep 13, 2011 at 09:21:45AM +0200, Nicolas M. Thiery wrote:
> > What does your FastHashMetaclass do precisely?
>
> Oops, I had not read the other thread yet ...
I just created a ticket for it: #11794.
The ne
Hi Nicolas,
> What does your FastHashMetaclass do precisely? Could we just throw the
> feature in ClasscallMetaclass? This could be a good occasion to find a
> more appropriate name for this metaclass. Speaking of which:
> ClasscallMetaclass and UniqueRepresentation would deserve to be
> cyt
On Tue, Sep 13, 2011 at 09:21:45AM +0200, Nicolas M. Thiery wrote:
> What does your FastHashMetaclass do precisely?
Oops, I had not read the other thread yet ...
Nicolas
--
Nicolas M. ThiƩry "Isil"
http://Nicolas.Thiery.name/
--
To post to this group, send an em
On Sun, Sep 11, 2011 at 04:07:39PM -0700, Simon King wrote:
> I found some comments stating that the current use of metaclasses in
> Sage is not very scalable.
That probably was from me.
> I guess that shall be understood as "things get messy if one puts a
> new metaclass on top of existing (and
Hi!
For the record: If the metaclass M of a new class C is dynamically
created, for example from the metaclasses of the bases of C, then
pickling of C indeed works after registering copy_reg.pickle(M,
M.__reduce__).
Remark:
I found some comments stating that the current use of metaclasses in
Sag
PS:
On 11 Sep., 23:01, Simon King wrote:
> So, perhaps that is the solution!
No, it didn't work. It is the same error. as before.
But is it perhaps required that in copy_reg.pickle(metacls, meth),
metacls is the exact metaclass of the class to be pickled?
In my case, I want to pickle the class
Hi Florent,
On 11 Sep., 22:26, Florent Hivert wrote:
> I'm not quite sure what's happening but at the end of
> the file there is a
>
> # This registers the appropriate reduction methods (depends on #5985)
> import copy_reg
> copy_reg.pickle(DynamicMetaclass, DynamicMetaclass.__reduce__)
>
> impor
Hi Simon,
You probably want to have a look at sage/structure/dynamic_class.py
which is the file solving those kinds of problems for dynamic classes created
by the category system. I'm not quite sure what's happening but at the end of
the file there is a
# This registers the appropriate redu
Hi Maarten,
On 11 Sep., 21:12, Maarten Derickx
wrote:
> can you check wether type(MyPolyRing).__reduce__() is actually called?
It isn't. I am currently trying to understand the "pickle" module. I
already found that it there is a special case when type(obj) is a
subclass of types.TypeType. That i
Hmm the only thing I can think of is that .__reduce__ is never called
because your metaclass (i.e. type(MyPolyRing)) is a subclass of a class wich
implements .__reduce_ex__
can you check wether type(MyPolyRing).__reduce__() is actually called?
--
To post to this group, send an email to sage-de
10 matches
Mail list logo