Created
May 5, 2012 10:13
-
-
Save Krastanov/2601322 to your computer and use it in GitHub Desktop.
why is there a diamond subclassing here?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the moment we have: | |
====================== | |
<~~~ is for metaclasses | |
| \ or / is for subclasses | |
Basic <~~~~~~~~ WithAssumptions | |
blah / \ | | |
\ / \ | | |
Expr Application <~~~ FunctionClass | |
\ / | |
\ / | |
Function | |
But changing it to: | |
=================== | |
Basic <~~~~~~~~ WithAssumptions | |
blah | | | |
\ | | | |
Expr | | |
| | | |
| | | |
Application <~~~ FunctionClass | |
| | |
Function | |
is a two line change in functions.py and does not cause any test failures | |
at least for | |
[./bin/test ./bin/doctest] [core function logic util] | |
Is there any drawback in the second approach? | |
I consider its simplicity an advantage. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@asmeurer, I mentioned them on the mailing list, but I am unsure where is the best place to have this discussion so I am posting them also here:
Most of these are operator on Hilbert spaces, Hilbert space vectors or some kind of containers like matrices:
sympy/core/relational.py:class Relational(Expr, EvalfMixin):
sympy/core/function.py:class Lambda(Expr):
sympy/core/function.py:class Subs(Expr):
sympy/matrices/expressions/matexpr.py:class MatrixExpr(Expr):
sympy/physics/quantum/spin.py:class WignerD(Expr):
sympy/physics/quantum/qexpr.py:class QExpr(Expr):
sympy/physics/quantum/innerproduct.py:class InnerProduct(Expr):
sympy/physics/quantum/anticommutator.py:class AntiCommutator(Expr):
sympy/physics/quantum/tensorproduct.py:class TensorProduct(Expr):
sympy/physics/quantum/commutator.py:class Commutator(Expr):
sympy/physics/quantum/dagger.py:class Dagger(Expr):
sympy/physics/quantum/cg.py:class Wigner3j(Expr):
sympy/physics/quantum/cg.py:class Wigner6j(Expr):
sympy/physics/quantum/cg.py:class Wigner9j(Expr):
sympy/physics/gaussopt.py:class BeamParameter(Expr):
sympy/physics/secondquant.py:class Dagger(Expr):
sympy/physics/secondquant.py:class TensorSymbol(Expr):
sympy/physics/secondquant.py:class SqOperator(Expr):
sympy/physics/secondquant.py:class FockState(Expr):
sympy/physics/secondquant.py:class PermutationOperator(Expr):
sympy/series/order.py:class Order(Expr):
sympy/tensor/indexed.py:class Indexed(Expr):
sympy/tensor/indexed.py:class IndexedBase(Expr):
sympy/tensor/indexed.py:class Idx(Expr):