Two instances of Symbol are equal if they have the same name.
"""
+ __slots__ = (
+ '_name',
+ '_constant',
+ '_symbols',
+ '_dimension',
+ )
+
def __new__(cls, name):
"""
Return a symbol with the name string given in argument.
fractions.Fraction classes.
"""
+ __slots__ = (
+ '_coefficients',
+ '_constant',
+ '_symbols',
+ '_dimension',
+ ) + Fraction.__slots__
+
def __new__(cls, numerator=0, denominator=None):
self = object().__new__(cls)
self._coefficients = {}