Have you tried? I assure you, you can create classes with constructors
which signature differs from the signature of the superclass constructor.
Anyway, even if you prefer to use `__new__`, you still need to pay
attention to the `args` attribute.
Also, keep in mind that what you are doing mixes t
Okay. So, this is what happens if I use __init__:
Symbol.__new__ is called. Here's the definition:
def __new__(cls, name, **assumptions):
"""Symbols are identified by name and assumptions::
As you can see, the method expects 2 positional arguments and rest are
keyword arguments (the assu
> But, that's what's happening right now as well. Symbol.__new__ is called
and it is cached. Therefore, the problem persists.
Except that you will probably have the correct `args`. Check this first.
I do not understand what is the issue with Symbol's __new__ could you show
the code that actually
@Stefan : Let us say I use __init__ instead. When I initialize a
BaseScalar, since a __new__ method isn't defined, that means the __new__ of
superclass (Symbol) will be called.
But, that's what's happening right now as well. Symbol.__new__ is called
and it is cached. Therefore, the problem pers