Skip to content
Snippets Groups Projects
Commit e550cf73 authored by Andreas Freise's avatar Andreas Freise
Browse files

removing custom __setitem__ again, because we do NOT

want to use things such as '1n' in pykat, it just needs
to be used during the init constructor which is used when
reading finesse code.
parent 3506d7b5
No related branches found
No related tags found
No related merge requests found
...@@ -57,12 +57,13 @@ class photodiode(Detector): ...@@ -57,12 +57,13 @@ class photodiode(Detector):
values = [] values = []
list.__init__(self,[SIfloat(value) for value in values]) list.__init__(self,[SIfloat(value) for value in values])
"""
def __setitem__(self, key, value): def __setitem__(self, key, value):
list.__setitem__(self,key, SIfloat(value)) list.__setitem__(self,key, SIfloat(value))
def append(self, value): def append(self, value):
list.append(self,SIfloat(value)) list.append(self,SIfloat(value))
"""
### todo add append with SIfloat ### todo add append with SIfloat
class __Phi(list): class __Phi(list):
...@@ -82,13 +83,13 @@ class photodiode(Detector): ...@@ -82,13 +83,13 @@ class photodiode(Detector):
return list.__getitem__(self,key) return list.__getitem__(self,key)
else: else:
return float(list.__getitem__(self,key)) return float(list.__getitem__(self,key))
"""
def __setitem__(self,key,value): def __setitem__(self,key,value):
list.__setitem__(self,key, self.__convertValue(value)) list.__setitem__(self,key, self.__convertValue(value))
def append(self, value): def append(self, value):
list.append(self,self.__convertValue(value)) list.append(self,self.__convertValue(value))
"""
### todo add append with convertValue ### todo add append with convertValue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment