From: Vivien Maisonneuve Date: Fri, 20 Jun 2014 06:25:48 +0000 (+0200) Subject: Fix Symbol.__slots__ X-Git-Tag: 1.0~225 X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/commitdiff_plain/49ee540c88ee9e40095635cf574e2966712d5101?ds=inline Fix Symbol.__slots__ --- diff --git a/pypol/isl.py b/pypol/isl.py index edfed5a..f15cea1 100644 --- a/pypol/isl.py +++ b/pypol/isl.py @@ -12,7 +12,7 @@ libisl.isl_dim_set = _isl.isl_dim_set class IslObject: __slots__ = ( - '_ptr' + '_ptr', ) def __init__(self, ptr): 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):