Am 11.03.2015 um 00:51 schrieb Ronan Lamy:
The PR that created this was https://github.com/sympy/sympy/pull/328

Wow, that's historic :-)

There wasn't any discussion about having BasicMeta as a metaclass of
ManagedProperties (called WithAssumptions then), but, IIRC, the reason
was to ensure correct registration of ManagedProperties and its
subclasses. Looking back, I'm not sure that it was really needed.

Understandable. Metaclasses can be very confusing the first time you deal with them.

My suggestion: try removing the metaclass relationship and see if
anything breaks!

Good idea, I'll try that.
Right now I'm trying to find out which member functions are part of Python's metaclass API (I think it's __call__, __new__, and __init__, but I haven't verified yet). The plan is to use that knowledge split the metaclass stuff into a different class hierarchy than the non-metaclass stuff; with luck, most non-meta classes are already there and it doesn't entail adding many classes.

I have another angle of attack: I suspect that most uses of with_metaclass are redundant because subclasses inherit the metaclass anyway. I hope to reduce the amount of code to worry about when refactoring metaclasses.

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/54FFDCD1.2080804%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to