From: eficas <> Date: Tue, 28 Feb 2006 11:30:27 +0000 (+0000) Subject: modif len parametre X-Git-Tag: merge_mars_06~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=563ec494066b50e278e2400081f8b31d964acbba;p=tools%2Feficas.git modif len parametre --- diff --git a/Extensions/param2.py b/Extensions/param2.py index 831308e8..5d307aac 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -15,7 +15,13 @@ def mkf(value): #class Formula(object): class Formula: - def __len__(self): return len(self.eval()) + def __len__(self): + val=self.eval() + if val is None:return 0 + try: + return len(val) + except: + return 1 def __complex__(self): return complex(self.eval()) def __int__(self): return int(self.eval()) def __long__(self): return long(self.eval())