Exemple #1
0
 def __setitem__(self, key, val):
     if not isinstance(val, WindowNode):
         raise TypeError, evalFmt(
             '{self.nodePath} only accepts instance of WindowNode or of its subclasses.'
         )
     if key != id(val):
         raise ValueError, 'The key should be identical to the ID of the window.'
     NodeDict.__setitem__(self, key, val)
Exemple #2
0
 def __setitem__(self, key, val):
     if not isinstance(val, AlgorithmNode):
         raise TypeError, evalFmt(
             '{self.nodePath} only accepts instance of Algorithm or of its subclasses.'
         )
     if key != val.meta.name:
         raise ValueError, 'The key should be identical to the name of the algorithm.'
     NodeDict.__setitem__(self, key, val)
Exemple #3
0
 def __setitem__(self, key, val):
     if not isinstance(val, AlgorithmNode):
         raise TypeError, evalFmt('{self.nodePath} only accepts instance of Algorithm or of its subclasses.')
     if key != val.meta.name:
         raise ValueError, 'The key should be identical to the name of the algorithm.'
     NodeDict.__setitem__(self, key, val)
Exemple #4
0
 def __init__(self, nodeName=''):
     NodeDict.__init__(self, nodeName=nodeName)
Exemple #5
0
 def __init__(self, nodeName=''):
     NodeDict.__init__(self, nodeName=nodeName)
Exemple #6
0
 def __setitem__(self, key, val):
     if not isinstance(val, WindowNode):
         raise TypeError, evalFmt("{self.nodePath} only accepts instance of WindowNode or of its subclasses.")
     if key != id(val):
         raise ValueError, "The key should be identical to the ID of the window."
     NodeDict.__setitem__(self, key, val)