From 7281d8b0679f0adf09352c02d2a4e8653a34bf90 Mon Sep 17 00:00:00 2001 From: eficas <> Date: Wed, 30 Nov 2005 07:33:16 +0000 Subject: [PATCH] CCAR: ajout classe Variable dans le module param2 --- Extensions/param2.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Extensions/param2.py b/Extensions/param2.py index d02aa46d..b5a9113e 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -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) -- 2.39.2