Fix Symbol.__slots__
[linpy.git] / pypol / linear.py
index 524b3cb..5b2dc80 100644 (file)
@@ -54,7 +54,7 @@ class Expression:
         '_coefficients',
         '_constant',
         '_symbols',
-        '_dimension'
+        '_dimension',
     )
 
     def __new__(cls, coefficients=None, constant=0):
@@ -362,6 +362,10 @@ class Constant(Expression):
 
 class Symbol(Expression):
 
+    __slots__ = Expression.__slots__ + (
+        '_name',
+    )
+
     def __new__(cls, name):
         if isinstance(name, Symbol):
             name = name.name
@@ -421,7 +425,7 @@ class Polyhedron:
         '_equalities',
         '_inequalities',
         '_constraints',
-        '_symbols'
+        '_symbols',
     )
 
     def __new__(cls, equalities=None, inequalities=None):