Open emilberwald opened 6 years ago
or perhaps a method that returns the type created based on the argument?
perhaps a copy constructor like this? https://stackoverflow.com/a/27441776/3021108
Another option is to create a class factory
def subclass(name,superclasses,**kwargs): T=type(name,superclasses,kwargs) if name in globals(): return globals()[name] else: globals()[name]=T or something. Perhaps dynamically create the name. Perhaps the internal name does not matter.
perhaps instead of a class variable in clifford, radd and rmatmul and trace should be overloaded? so several bilinear products can be used?