projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Symbol.__slots__
[linpy.git]
/
pypol
/
linear.py
diff --git
a/pypol/linear.py
b/pypol/linear.py
index
524b3cb
..
5b2dc80
100644
(file)
--- a/
pypol/linear.py
+++ b/
pypol/linear.py
@@
-54,7
+54,7
@@
class Expression:
'_coefficients',
'_constant',
'_symbols',
'_coefficients',
'_constant',
'_symbols',
- '_dimension'
+ '_dimension'
,
)
def __new__(cls, coefficients=None, constant=0):
)
def __new__(cls, coefficients=None, constant=0):
@@
-362,6
+362,10
@@
class Constant(Expression):
class Symbol(Expression):
class Symbol(Expression):
+ __slots__ = Expression.__slots__ + (
+ '_name',
+ )
+
def __new__(cls, name):
if isinstance(name, Symbol):
name = name.name
def __new__(cls, name):
if isinstance(name, Symbol):
name = name.name
@@
-421,7
+425,7
@@
class Polyhedron:
'_equalities',
'_inequalities',
'_constraints',
'_equalities',
'_inequalities',
'_constraints',
- '_symbols'
+ '_symbols'
,
)
def __new__(cls, equalities=None, inequalities=None):
)
def __new__(cls, equalities=None, inequalities=None):