X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/2a56c56cadd9be4dd461218b1620d2617ca8a924..49ee540c88ee9e40095635cf574e2966712d5101:/pypol/linear.py?ds=inline diff --git a/pypol/linear.py b/pypol/linear.py index 524b3cb..5b2dc80 100644 --- a/pypol/linear.py +++ b/pypol/linear.py @@ -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):