]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
CCAR: ajout classe Variable dans le module param2
authoreficas <>
Wed, 30 Nov 2005 07:33:16 +0000 (07:33 +0000)
committereficas <>
Wed, 30 Nov 2005 07:33:16 +0000 (07:33 +0000)
Extensions/param2.py

index d02aa46d8f25f37dc65269f43e81deb25016c972..b5a9113ef2ec4fece34ef58f62dd9ec3c2e311df 100644 (file)
@@ -74,5 +74,13 @@ class Constant(Formula):
     def eval(self): return self._value
     def __str__(self): return str(self._value)
 
+class Variable(Formula):
+    def __init__(self,name,value):
+        self._name=name
+        self._value=value
+    def eval(self): return self._value
+    def __repr__(self): return "Variable('%s',%s)" % (self._name, self._value)
+    def __str__(self): return self._name
+
 def cos(f): return Unop('cos', f)
 def sin(f): return Unop('sin', f)